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

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