On 7/28/16, Stefan Hajnoczi <[email protected]> wrote: > On Wed, Jul 27, 2016 at 3:51 PM, Reda Sallahi <[email protected]> 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 <[email protected]>
