mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
Using count=0 is sufficient for creation of zeroed files.
This commit is contained in:
parent
1d1db98a2e
commit
fcf46a9a42
@ -186,7 +186,7 @@ prepare_loop() {
|
||||
done
|
||||
|
||||
LOOPFILE="$PWD/test.img"
|
||||
dd if=/dev/zero of="$LOOPFILE" bs=$((1024*1024)) count=1 seek=$(($size-1))
|
||||
dd if=/dev/zero of="$LOOPFILE" bs=$((1024*1024)) count=0 seek=$(($size-1))
|
||||
if LOOP=`losetup -s -f "$LOOPFILE" 2>/dev/null`; then
|
||||
return 0
|
||||
elif LOOP=`losetup -f` && losetup $LOOP "$LOOPFILE"; then
|
||||
|
Loading…
Reference in New Issue
Block a user