qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5 08/12] qemu-img: Enable progress output for c


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v5 08/12] qemu-img: Enable progress output for commit
Date: Tue, 22 Apr 2014 09:23:03 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

On 04/17/2014 03:59 PM, Max Reitz wrote:
> Implement progress output for the commit command by querying the
> progress of the block job.
> 
> Signed-off-by: Max Reitz <address@hidden>
> ---
>  qemu-img-cmds.hx |  4 ++--
>  qemu-img.c       | 24 ++++++++++++++++++++++--
>  qemu-img.texi    |  2 +-
>  3 files changed, 25 insertions(+), 5 deletions(-)
> 

> +
> +    /* A block job may finish instantanously without publishing any progress,

s/instantanously/instantaneously/


> @@ -733,7 +739,7 @@ static int img_commit(int argc, char **argv)
>      fmt = NULL;
>      cache = BDRV_DEFAULT_CACHE;
>      for(;;) {
> -        c = getopt(argc, argv, "f:ht:q");
> +        c = getopt(argc, argv, "f:ht:qp");

Here, 'p' is last,...

>          if (c == -1) {
>              break;
>          }
> @@ -748,11 +754,20 @@ static int img_commit(int argc, char **argv)
>          case 't':
>              cache = optarg;
>              break;
> +        case 'p':
> +            progress = true;
> +            break;
>          case 'q':

...but here, 'q' is last.  The OCD side of me likes to list getopt()
arguments in the same order as the case statements in order to more
easily map the two to each other and ensure we aren't missing anything
(the truly OCD person insists on sorting things alphabetically, or at
least case-insensitively).  As order doesn't actually matter to the
compiler, it doesn't invalidate this patch; but something to consider if
you respin for other reasons.  :)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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