mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Using count=0 is sufficient for creation of zeroed files.
This commit is contained in:
parent
c133a264b0
commit
380cd989ac
@ -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