[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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v5 05/12] block/mirror: Improve progress report, (continued)
- [Qemu-devel] [PATCH v5 05/12] block/mirror: Improve progress report, Max Reitz, 2014/04/17
- [Qemu-devel] [PATCH v5 06/12] qemu-img: Implement commit like QMP, Max Reitz, 2014/04/17
- [Qemu-devel] [PATCH v5 07/12] qemu-img: Empty images after commit, Max Reitz, 2014/04/17
- Re: [Qemu-devel] [PATCH v5 07/12] qemu-img: Empty images after commit, Eric Blake, 2014/04/22
- Re: [Qemu-devel] [PATCH v5 07/12] qemu-img: Empty images after commit, Max Reitz, 2014/04/22
- Re: [Qemu-devel] [PATCH v5 07/12] qemu-img: Empty images after commit, Max Reitz, 2014/04/22
- Re: [Qemu-devel] [PATCH v5 07/12] qemu-img: Empty images after commit, Eric Blake, 2014/04/22
- Re: [Qemu-devel] [PATCH v5 07/12] qemu-img: Empty images after commit, Max Reitz, 2014/04/22
- Re: [Qemu-devel] [PATCH v5 07/12] qemu-img: Empty images after commit, Eric Blake, 2014/04/22
[Qemu-devel] [PATCH v5 08/12] qemu-img: Enable progress output for commit, Max Reitz, 2014/04/17
- Re: [Qemu-devel] [PATCH v5 08/12] qemu-img: Enable progress output for commit,
Eric Blake <=
[Qemu-devel] [PATCH v5 09/12] qemu-img: Specify backing file for commit, Max Reitz, 2014/04/17
[Qemu-devel] [PATCH v5 10/12] iotests: Add _filter_qemu_img_map, Max Reitz, 2014/04/17
[Qemu-devel] [PATCH v5 11/12] iotests: Add test for backing-chain commits, Max Reitz, 2014/04/17
[Qemu-devel] [PATCH v5 12/12] iotests: Omit length/offset test in 040 and 041, Max Reitz, 2014/04/17