Re: [Qemu-devel] [PATCH 3/7] qemu-img: add more conv= conversions to dd

2016-08-23 Thread Stefan Hajnoczi
On Mon, Aug 22, 2016 at 04:02:30PM +0200, Reda Sallahi wrote: > On Mon, Aug 22, 2016 at 09:35:26AM -0400, Stefan Hajnoczi wrote: > > On Mon, Aug 22, 2016 at 09:55:13AM +0200, Reda Sallahi wrote: > > > @@ -4325,20 +4388,43 @@ static int img_dd(int argc, char **argv) > > > > > > for (out_pos =

Re: [Qemu-devel] [PATCH 3/7] qemu-img: add more conv= conversions to dd

2016-08-22 Thread Reda Sallahi
On Mon, Aug 22, 2016 at 09:35:26AM -0400, Stefan Hajnoczi wrote: > On Mon, Aug 22, 2016 at 09:55:13AM +0200, Reda Sallahi wrote: > > @@ -4325,20 +4388,43 @@ static int img_dd(int argc, char **argv) > > > > for (out_pos = out.offset * obsz; in_pos < size; block_count++) { > > int in_

Re: [Qemu-devel] [PATCH 3/7] qemu-img: add more conv= conversions to dd

2016-08-22 Thread Stefan Hajnoczi
On Mon, Aug 22, 2016 at 09:55:13AM +0200, Reda Sallahi wrote: > static int img_dd_conv(const char *arg, > struct DdIo *in, struct DdIo *out, > struct DdInfo *dd) > { > -if (!strcmp(arg, "notrunc")) { > -dd->conv |= C_NOTRUNC; > -

[Qemu-devel] [PATCH 3/7] qemu-img: add more conv= conversions to dd

2016-08-22 Thread Reda Sallahi
This patch adds excl, nocreat, noerror, sync, fsync, fdatasync and sparse to the conversion list. They have the same meaning as the ones on GNU dd(1). Two tests were added to test the conv= option. Signed-off-by: Reda Sallahi --- qemu-img-cmds.hx | 4 +- qemu-img.c |