From 86ce1f6e2b73b33c4a52818e245378bf52d27200 Mon Sep 17 00:00:00 2001 From: Reda Sallahi Date: Wed, 10 Aug 2016 04:43:12 +0200 Subject: qemu-img: add the 'dd' subcommand 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 Message-id: 20160810024312.14544-1-fullmanet@gmail.com Reviewed-by: Stefan Hajnoczi [mreitz: Moved test 158 to 170] Signed-off-by: Max Reitz --- qemu-img-cmds.hx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'qemu-img-cmds.hx') diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx index 7e95b2da79..03bdd7ad7b 100644 --- a/qemu-img-cmds.hx +++ b/qemu-img-cmds.hx @@ -45,6 +45,12 @@ STEXI @item convert [--object @var{objectdef}] [--image-opts] [-c] [-p] [-q] [-n] [-f @var{fmt}] [-t @var{cache}] [-T @var{src_cache}] [-O @var{output_fmt}] [-o @var{options}] [-s @var{snapshot_id_or_name}] [-l @var{snapshot_param}] [-S @var{sparse_size}] @var{filename} [@var{filename2} [...]] @var{output_filename} ETEXI +DEF("dd", img_dd, + "dd [--image-opts] [-f fmt] [-O output_fmt] [bs=block_size] [count=blocks] if=input of=output") +STEXI +@item dd [--image-opts] [-f @var{fmt}] [-O @var{output_fmt}] [bs=@var{block_size}] [count=@var{blocks}] if=@var{input} of=@var{output} +ETEXI + DEF("info", img_info, "info [--object objectdef] [--image-opts] [-f fmt] [--output=ofmt] [--backing-chain] filename") STEXI -- cgit v1.2.1