diff options
author | Reda Sallahi <fullmanet@gmail.com> | 2016-08-10 04:43:12 +0200 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2016-09-20 22:10:57 +0200 |
commit | 86ce1f6e2b73b33c4a52818e245378bf52d27200 (patch) | |
tree | 218a8d843ce6fcb5b9b075e7b81913eac2e95e3e /qemu-img-cmds.hx | |
parent | a008535b9fa396226ff9cf78b8ac5f3584bda58e (diff) |
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 <fullmanet@gmail.com>
Message-id: 20160810024312.14544-1-fullmanet@gmail.com
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[mreitz: Moved test 158 to 170]
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'qemu-img-cmds.hx')
-rw-r--r-- | qemu-img-cmds.hx | 6 |
1 files changed, 6 insertions, 0 deletions
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 |