[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 00/23] qemu-img: refersh options and --help handling
From: |
Michael Tokarev |
Subject: |
[PATCH 00/23] qemu-img: refersh options and --help handling |
Date: |
Sat, 10 Feb 2024 00:22:21 +0300 |
Quite big patchset implementing normal, readable qemu-img --help
(and qemu-img COMMAND --help) output with readable descriptions,
and adding many long options in the process.
In the end I stopped using qemu-img-opts.hx in qemu-img.c, perhaps
this can be avoided, with only list of commands and their desrciptions
kept there, but I don't see big advantage here. The same list should
be included in docs/tools/qemu-img.rst, - this is not done now.
Also each command syntax isn't reflected in the doc for now, because
I want to give good names for options first, - and there, we've quite
some inconsistences and questions. For example, measure --output=OFMT
-O OFMT, - this is priceless :) I've no idea why we have this ugly
--output=json thing, why not have --json? ;) I gave the desired
format long name --target-format to avoid clash with --output.
For rebase, src vs tgt probably should be renamed in local variables
too, and I'm not even sure I've got the caches right. For caches,
the thing is inconsistent across commands.
For compare, I used --a-format/--b-format (for -f/-F), - this can
be made --souce-format and --target-format, to compare source (file1)
with target (file2).
For bitmap, things are scary, I'm not sure what -b SRC_FILENAME
really means, - for now I gave it --source option, but this does
not make it more clear, suggestions welcome.
There are many other inconsistencies, I can't fix them all in one
go.. :)
Michael Tokarev (23):
qemu-img: pass current cmd info into command handlers
qemu-img: refresh options/--help for "create" subcommand
qemu-img: factor out parse_output_format() and use it in the code
qemu-img: refresh options/--help for "check" command
qemu-img: simplify --repair error message
qemu-img: refresh options/--help for "commit" command
qemu-img: refresh options/--help for "compare" command
qemu-img: refresh options/--help for "convert" command
qemu-img: refresh options/--help for "info" command
qemu-img: refresh options/--help for "map" command
qemu-img: allow specifying -f fmt for snapshot subcommand
qemu-img: make -l (list) the default for "snapshot" subcommand
qemu-img: refresh options/--help for "snapshot" command
qemu-img: refresh options/--help for "rebase" command
qemu-img: resize: do not always eat last argument
qemu-img: refresh options/--help for "resize" command
qemu-img: refresh options/--help for "amend" command
qemu-img: refresh options/--help for "bench" command
qemu-img: refresh options/--help for "bitmap" command
qemu-img: refresh options/--help for "dd" command
qemu-img: refresh options/--help for "measure" command
qemu-img: implement short --help, remove global help() function
qemu-img: inline list of supported commands, remove qemu-img-cmds.h
include
docs/tools/qemu-img.rst | 2 +-
qemu-img-cmds.hx | 4 +-
qemu-img.c | 843 ++++++++++++++++++++++++++--------------
3 files changed, 558 insertions(+), 291 deletions(-)
--
2.39.2
- [PATCH 00/23] qemu-img: refersh options and --help handling,
Michael Tokarev <=
- [PATCH 01/23] qemu-img: pass current cmd info into command handlers, Michael Tokarev, 2024/02/09
- [PATCH 02/23] qemu-img: refresh options/--help for "create" subcommand, Michael Tokarev, 2024/02/09
- [PATCH 03/23] qemu-img: factor out parse_output_format() and use it in the code, Michael Tokarev, 2024/02/09
- [PATCH 04/23] qemu-img: refresh options/--help for "check" command, Michael Tokarev, 2024/02/09
- [PATCH 05/23] qemu-img: simplify --repair error message, Michael Tokarev, 2024/02/09
- [PATCH 06/23] qemu-img: refresh options/--help for "commit" command, Michael Tokarev, 2024/02/09