[Qemu-devel] [PATCH v2 1/4] qemu-img: Sort sub-command names in --help

Eric Blake posted 4 patches 8 years, 6 months ago
There is a newer version of this series
[Qemu-devel] [PATCH v2 1/4] qemu-img: Sort sub-command names in --help
Posted by Eric Blake 8 years, 6 months ago
'amend' was the only sub-command not listed alphabetically; hoist
it earlier, and separate the @end table block to make it easier
to copy-and-paste the addition of future sub-commands.

Signed-off-by: Eric Blake <eblake@redhat.com>
---
 qemu-img-cmds.hx | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx
index 3763f13625..8bd6f748c3 100644
--- a/qemu-img-cmds.hx
+++ b/qemu-img-cmds.hx
@@ -9,6 +9,12 @@ STEXI
 @table @option
 ETEXI

+DEF("amend", img_amend,
+    "amend [--object objectdef] [--image-opts] [-p] [-q] [-f fmt] [-t cache] -o options filename")
+STEXI
+@item amend [--object @var{objectdef}] [--image-opts] [-p] [-q] [-f @var{fmt}] [-t @var{cache}] -o @var{options} @var{filename}
+ETEXI
+
 DEF("bench", img_bench,
     "bench [-c count] [-d depth] [-f fmt] [--flush-interval=flush_interval] [-n] [--no-drain] [-o offset] [--pattern=pattern] [-q] [-s buffer_size] [-S step_size] [-t cache] [-w] [-U] filename")
 STEXI
@@ -87,9 +93,6 @@ STEXI
 @item resize [--object @var{objectdef}] [--image-opts] [-q] @var{filename} [+ | -]@var{size}
 ETEXI

-DEF("amend", img_amend,
-    "amend [--object objectdef] [--image-opts] [-p] [-q] [-f fmt] [-t cache] -o options filename")
 STEXI
-@item amend [--object @var{objectdef}] [--image-opts] [-p] [-q] [-f @var{fmt}] [-t @var{cache}] -o @var{options} @var{filename}
 @end table
 ETEXI
-- 
2.13.3


Re: [Qemu-devel] [PATCH v2 1/4] qemu-img: Sort sub-command names in --help
Posted by Daniel P. Berrange 8 years, 6 months ago
On Fri, Jul 28, 2017 at 11:47:05AM -0500, Eric Blake wrote:
> 'amend' was the only sub-command not listed alphabetically; hoist
> it earlier, and separate the @end table block to make it easier
> to copy-and-paste the addition of future sub-commands.
> 
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
>  qemu-img-cmds.hx | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Re: [Qemu-devel] [PATCH v2 1/4] qemu-img: Sort sub-command names in --help
Posted by Kevin Wolf 8 years, 6 months ago
Am 28.07.2017 um 18:47 hat Eric Blake geschrieben:
> 'amend' was the only sub-command not listed alphabetically;

Not completel true: create is the second one that is in the wrong place,
it should come after commit/compare/convert. Do you want to fix that
one, too?

> hoist it earlier, and separate the @end table block to make it easier
> to copy-and-paste the addition of future sub-commands.
> 
> Signed-off-by: Eric Blake <eblake@redhat.com>

Kevin

Re: [Qemu-devel] [PATCH v2 1/4] qemu-img: Sort sub-command names in --help
Posted by Eric Blake 8 years, 6 months ago
On 08/03/2017 10:14 AM, Kevin Wolf wrote:
> Am 28.07.2017 um 18:47 hat Eric Blake geschrieben:
>> 'amend' was the only sub-command not listed alphabetically;
> 
> Not completel true: create is the second one that is in the wrong place,
> it should come after commit/compare/convert. Do you want to fix that
> one, too?

Indeed.  I wonder if part of the issue is due to an 80-columen window
displaying qemu-img --help as a wall-o-text and therefore I missed
command names; maybe some well-place newlines and tabs would aid
legibility, as in:

  bench [-c count] [-d depth] [-f fmt] [--flush-interval=flush_interval]
	[-n] [--no-drain] [-o offset] [--pattern=pattern] [-q]
	[-s buffer_size] [-S step_size] [-t cache] [-w] [-U] filename
  check [-q] [--object objectdef] [--image-opts] [-f fmt]
	[--output=ofmt] [-r [leaks | all]] [-T src_cache] [-U] filename
...

But for this patch, I'll just fix the sorting of 'create'.

> 
>> hoist it earlier, and separate the @end table block to make it easier
>> to copy-and-paste the addition of future sub-commands.
>>
>> Signed-off-by: Eric Blake <eblake@redhat.com>
> 
> Kevin
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org