1
0
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:
Zdenek Kabelac 2010-08-02 13:18:42 +00:00
parent 1d1db98a2e
commit fcf46a9a42

View File

@ -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