From c6bb9ad198c2caa9c7c8ba360a07630b5c10e4a8 Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Mon, 28 Jan 2013 06:59:46 -0500 Subject: qemu-img: find the image end offset during check This patch adds the support for reporting the image end offset (in bytes). This is particularly useful after a conversion (or a rebase) where the destination is a block device in order to find the first unused byte at the end of the image. Signed-off-by: Federico Simoncelli Signed-off-by: Kevin Wolf --- tests/qemu-iotests/common.rc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/qemu-iotests/common.rc') diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index aef5f52..5ba960b 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -161,9 +161,10 @@ _cleanup_test_img() _check_test_img() { - $QEMU_IMG check -f $IMGFMT $TEST_IMG 2>&1 | \ - grep -v "fragmented$" | \ - sed -e 's/qemu-img\: This image format does not support checks/No errors were found on the image./' + $QEMU_IMG check "$@" -f $IMGFMT $TEST_IMG 2>&1 | \ + sed -e "/fragmented$/d" \ + -e 's/qemu-img: This image format does not support checks/No errors were found on the image./' \ + -e '/Image end offset: [0-9]\+/d' } _img_info() -- cgit v1.1