qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v5] qemu-img: add skip option to dd


From: Max Reitz
Subject: Re: [Qemu-block] [PATCH v5] qemu-img: add skip option to dd
Date: Wed, 10 Aug 2016 18:29:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 10.08.2016 16:16, Reda Sallahi wrote:
> This adds the skip option which allows qemu-img dd to skip a number of blocks
> before copying the input.
> 
> A test case was added to test the skip option.
> 
> Signed-off-by: Reda Sallahi <address@hidden>
> ---
> Depends on:
> [PATCH v9] qemu-img: add the 'dd' subcommand
> 
> Changes from v4:
> * Rebase.
> Changes from v3:
> * Change write command to the test image in the test case.
> Changes from v2:
> * Delete a tab that sneaked in (test case 160).
> Changes from v1:
> * Change test case output.
> 
>  qemu-img-cmds.hx           |  4 +--
>  qemu-img.c                 | 50 ++++++++++++++++++++++++++++----
>  qemu-img.texi              |  4 ++-
>  tests/qemu-iotests/160     | 72 
> ++++++++++++++++++++++++++++++++++++++++++++++
>  tests/qemu-iotests/160.out | 51 ++++++++++++++++++++++++++++++++
>  tests/qemu-iotests/group   |  1 +
>  6 files changed, 174 insertions(+), 8 deletions(-)
>  create mode 100755 tests/qemu-iotests/160
>  create mode 100644 tests/qemu-iotests/160.out

[...]

> diff --git a/qemu-img.c b/qemu-img.c
> index 034baf7..3adec86 100644
> --- a/qemu-img.c
> +++ b/qemu-img.c

[...]

> @@ -4049,9 +4078,20 @@ static int img_dd(int argc, char **argv)

[...]

> -    for (in_pos = 0, out_pos = 0; in_pos < size; block_count++) {
> +    for (out_pos = 0; in_pos < size; block_count++) {

*whistle* /me hopes nobody will notice that block_count is absolutely
unused apart from this place...

Anyway, thanks, I've applied this patch to my block-next branch:

https://github.com/XanClic/qemu/commits/block-next

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]