diff options
author | Karel Zak | 2007-10-26 00:55:36 +0200 |
---|---|---|
committer | Karel Zak | 2007-10-26 01:02:45 +0200 |
commit | 32f7216b4c480e140a035c92319e527120d26616 (patch) | |
tree | a431a1f5a775aac0557fa4c6d331e9d12dba572d /tests/functions.sh | |
parent | tailf: opened file leaving unclosed (diff) | |
download | kernel-qcow2-util-linux-32f7216b4c480e140a035c92319e527120d26616.tar.gz kernel-qcow2-util-linux-32f7216b4c480e140a035c92319e527120d26616.tar.xz kernel-qcow2-util-linux-32f7216b4c480e140a035c92319e527120d26616.zip |
tests: use losetup -s
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/functions.sh')
-rw-r--r-- | tests/functions.sh | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/functions.sh b/tests/functions.sh index 7b555f5fe..660e4adfe 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -173,15 +173,13 @@ function ts_restore_cache { function ts_device_init { local IMAGE="$TS_OUTDIR/$TS_NAME.img" - local IMAGE_RE=$( echo "$IMAGE" | sed 's:/:\\/:g' ) local DEV="" ts_backup_cache dd if=/dev/zero of="$IMAGE" bs=1M count=5 &> /dev/null - $TS_CMD_LOSETUP -f "$IMAGE" 2>&1 >> $TS_OUTPUT - DEV=$( $TS_CMD_LOSETUP -a | $AWK 'BEGIN {FS=":"} /'$IMAGE_RE'/ { print $1 }' ) + DEV=$($TS_CMD_LOSETUP -s -f "$IMAGE") if [ -z "$DEV" ]; then ts_device_deinit $DEV |