Skip to content

refresh qemu-img options handling

Michael Tokarev qemu-devel 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest27 patches 7 repliesIn review
  2. v3 posting 2/227 patches 14 repliesSuperseded
  3. v3 posting 1/227 patches 2 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v228 patches19 repliesSuperseded
v123 patches19 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/27qemu-img: measure: convert img_size to signed, simplify handlingqemu-img.c+7 -120 replies
2/27qemu-img: create: convert img_size to signed, simplify handlingqemu-img.c+3 -60 replies
3/27qemu-img: global option processing and error printingqemu-img.c+43 -370 replies
4/27qemu-img: pass current cmd info into command handlersqemu-img.c+17 -170 replies
5/27qemu-img: create: refresh options/--help (short option change)docs/tools/qemu-img.rst qemu-img.c+73 -210 replies
6/27qemu-img: factor out parse_output_format() and use it in the codeqemu-img.c+18 -450 replies
7/27qemu-img: check: refresh options/--helpqemu-img.c+41 -190 replies
8/27qemu-img: simplify --repair error messageqemu-img.c+3 -20 replies
9/27qemu-img: commit: refresh options/--helpqemu-img.c+48 -200 replies
10/27qemu-img: compare: use helper function for --objectqemu-img.c+2 -140 replies
11/27qemu-img: compare: refresh options/--helpqemu-img.c+46 -180 replies
12/27qemu-img: convert: refresh options/--help (short option change)docs/tools/qemu-img.rst qemu-img.c+156 -730 replies
12/27qemu-img: convert: refresh options/--help (short option change)docs/tools/qemu-img.rst qemu-img.c+159 -730 replies
13/27qemu-img: info: refresh options/--helpqemu-img.c+34 -201 reply
14/27qemu-img: map: refresh options/--helpqemu-img.c+36 -212 replies
14/27qemu-img: map: refresh options/--helpqemu-img.c+38 -210 replies
15/27qemu-img: snapshot: allow specifying -f fmtdocs/tools/qemu-img.rst qemu-img-cmds.hx qemu-img.c+9 -60 replies
16/27qemu-img: snapshot: make -l (list) the default, simplify option handlingdocs/tools/qemu-img.rst qemu-img.c+19 -350 replies
17/27qemu-img: snapshot: refresh options/--helpqemu-img.c+44 -160 replies
18/27qemu-img: rebase: refresh options/--help (short option change)docs/tools/qemu-img.rst qemu-img.c+64 -260 replies
19/27qemu-img: resize: do not always eat last argumentqemu-img.c+27 -140 replies
20/27qemu-img: resize: refresh options/--helpqemu-img.c+36 -160 replies
21/27qemu-img: amend: refresh options/--helpqemu-img.c+39 -150 replies
22/27qemu-img: bench: refresh options/--helpqemu-img.c+84 -280 replies
23/27qemu-img: bitmap: refresh options/--helpqemu-img.c+56 -240 replies
24/27qemu-img: dd: refresh options/--helpqemu-img.c+36 -140 replies
25/27qemu-img: measure: refresh options/--helpqemu-img.c+62 -270 replies
26/27qemu-img: implement short --help, remove global help() functionqemu-img.c+72 -1380 replies
27/27qemu-img: extend cvtnum() and use it in more placesqemu-img.c tests/qemu-iotests/049.out+40 -800 replies

Reviews trailers per patch

10 of 29 patches have a Reviewed-by or Acked-by.

PatchKevin WolfDaniel P. Berrangé
1/27R-b R-b
2/27R-b R-b
3/27R-b
4/27R-b R-b
5/27
6/27R-b R-b
7/27
8/27R-b
9/27
10/27
11/27
12/27
12/27
13/27
14/27
14/27
15/27R-b
16/27R-b
17/27
18/27
19/27
20/27
21/27
22/27
23/27
24/27
25/27
26/27R-b
27/27R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 00/27] refresh qemu-img options handling

This is another iteration of this patch series, which tries to add missing command-line options, --help output, make it all more or less consistent, etc.

I addressed (hopefully) all comments so far, mostly by Kevin. I ended up (so far) with a bit different wording somewhere.

The manpage (and the separate documentation) hasn't changed much, but I intend to use the same wording there as in --help
output. An example of the separate documentation change is
provided with "create" subcommand only, as a PoC.

I tried to rename a few existing options to make them more consistent. This is an RFC, so to say, - I'd love to make more changes but it isn't really possible because the names I want to use are already used for different purpose. All such changes (3 in total) are marked with "(short option change)" suffix in the patch subject. In particular, I tried to use -b for backing-file, and -B for backing-format, in all places. Maybe it's too late to change that though.

All subcommands now have --object option. I wonder why we haven't done it in common place, before a subcommand. Maybe it's a good idea (and I think it is) to add it to the common (before-subcomman) place, document it there, and remove the --object mentions from individual commands --help output.

Thanks,

/mjt

Michael Tokarev (27):
qemu-img: measure: convert img_size to signed, simplify handling
qemu-img: create: convert img_size to signed, simplify handling
qemu-img: global option processing and error printing
qemu-img: pass current cmd info into command handlers
qemu-img: create: refresh options/--help (short option change)
qemu-img: factor out parse_output_format() and use it in the code
qemu-img: check: refresh options/--help
qemu-img: simplify --repair error message
qemu-img: commit: refresh options/--help
qemu-img: compare: use helper function for --object
qemu-img: compare: refresh options/--help
qemu-img: convert: refresh options/--help (short option change)
qemu-img: info: refresh options/--help
qemu-img: map: refresh options/--help
qemu-img: snapshot: allow specifying -f fmt
qemu-img: snapshot: make -l (list) the default, simplify option handling
qemu-img: snapshot: refresh options/--help
qemu-img: rebase: refresh options/--help (short option change)
qemu-img: resize: do not always eat last argument
qemu-img: resize: refresh options/--help
qemu-img: amend: refresh options/--help
qemu-img: bench: refresh options/--help
qemu-img: bitmap: refresh options/--help
qemu-img: dd: refresh options/--help
qemu-img: measure: refresh options/--help
qemu-img: implement short --help, remove global help() function
qemu-img: extend cvtnum() and use it in more places

 docs/tools/qemu-img.rst    |   18 +-
 qemu-img-cmds.hx           |    4 +-
 qemu-img.c                 | 1782 +++++++++++++++++++++---------------
 tests/qemu-iotests/049.out |    9 +-
 4 files changed, 1082 insertions(+), 731 deletions(-)
Signature · 1 line
2.39.5