From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bX39k-0005Rr-JW for qemu-devel@nongnu.org; Tue, 09 Aug 2016 05:17:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bX39i-000084-KV for qemu-devel@nongnu.org; Tue, 09 Aug 2016 05:17:03 -0400 Date: Tue, 9 Aug 2016 11:16:53 +0200 From: Kevin Wolf Message-ID: <20160809091653.GC5030@noname.str.redhat.com> References: <20160725055842.3836-1-fullmanet@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160725055842.3836-1-fullmanet@gmail.com> Subject: Re: [Qemu-devel] [PATCH v6] qemu-img: add the 'dd' subcommand List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Reda Sallahi Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, Fam Zheng , Max Reitz Am 25.07.2016 um 07:58 hat Reda Sallahi geschrieben: > This patch adds a basic dd subcommand analogous to dd(1) to qemu-img. > > For the start, this implements the bs, if, of and count options and requires > both if and of to be specified (no stdin/stdout if not specified) and doesn't > support tty, pipes, etc. > > The image format must be specified with -O for the output if the raw format > is not the intended one. > > Two tests are added to test qemu-img dd. > > Signed-off-by: Reda Sallahi > +/* > + * get_size() was needed for the size syntax dd(1) supports which is > + * different from qemu_strtosz_suffix() > + * > + */ (Excess empty line in comment) Is it really a good idea to stay consistent with dd when this makes the subcommand inconsistent with all other size specifications in qemu? If I understand correctly, the only difference is that some suffixes wouldn't be supported, so you would get an error message rather than surprising behaviour. I would consider that fine and probably preferrable to adding another size parser. Nobody uses 'c', 'w' or 'b' anyway. Kevin