qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-block] [PATCH v3] qemu-img: add skip option to dd


From: Reda Sallahi
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v3] qemu-img: add skip option to dd
Date: Thu, 28 Jul 2016 17:51:50 +0200

On 7/28/16, Stefan Hajnoczi <address@hidden> wrote:
> On Wed, Jul 27, 2016 at 3:51 PM, Reda Sallahi <address@hidden> wrote:
>> -    qemu_opt_set_number(opts, BLOCK_OPT_SIZE, size, &error_abort);
>> +    if (dd.flags & C_SKIP && size < in.bsz * in.offset) {
>> +        error_report("%s: cannot skip to specified offset",
>> in.filename);
>> +        qemu_opt_set_number(opts, BLOCK_OPT_SIZE, 0, &error_abort);
>
> This looks odd.  What is supposed to happen in this case?  Do you have
> a test case for it?
>

We print a warning if we have specified a too big of a value for skip (bigger
than the input size) and set the size to 0 for the output disk image. It's the
same behavior on dd(1).

In the last iteration of the test case it covers such a case. Though without
checking the output on stderr.

-- 
Reda <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]