[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/7] qemu-img: add status option to dd
From: |
Reda Sallahi |
Subject: |
Re: [Qemu-devel] [PATCH 5/7] qemu-img: add status option to dd |
Date: |
Mon, 22 Aug 2016 15:50:26 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
I should have checked the previous test suites because :
Mon, Aug 22, 2016 at 09:55:15AM +0200, Reda Sallahi wrote:
>
> if (in.offset > INT64_MAX / ibsz || size < in.offset * ibsz) {
> - /* We give a warning if the skip option is bigger than the input
> - * size and create an empty output disk image (i.e. like dd(1)).
> - */
> - error_report("%s: cannot skip to specified offset", in.filename);
> - in_pos = size;
> + if (!(dd.status & C_STATUS_NONE)) {
> + /* We give a warning if the skip option is bigger than the input
> + * size and create an empty output disk image (i.e. like dd(1)).
> + */
> + error_report("%s: cannot skip to specified offset", in.filename);
> + in_pos = size;
> + }
in_pos = size should have gone outside of this last block. This means in_pos
is set to size only if dd.status != C_STATUS_NONE.
> +$QEMU_IMG compare "$TEST_IMG" "$TEST_IMG.out"
And also this should have been $TEST_IMG.out.dd.
I fixed this just now (and with a test file that also adds in skip and seek)
and will send it in the next version.
--
Reda