[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/8] qemu-img: refresh options/--help for "commit" command
From: |
Michael Tokarev |
Subject: |
[PATCH 6/8] qemu-img: refresh options/--help for "commit" command |
Date: |
Wed, 7 Feb 2024 20:58:15 +0300 |
Add missing long options and --help output.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
qemu-img.c | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/qemu-img.c b/qemu-img.c
index 31c1891b43..7ff63aeea2 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -1015,8 +1015,15 @@ static int img_commit(const char *cmdname, int argc,
char **argv)
for(;;) {
static const struct option long_options[] = {
{"help", no_argument, 0, 'h'},
+ {"quiet", no_argument, 0, 'q'},
{"object", required_argument, 0, OPTION_OBJECT},
+ {"format", required_argument, 0, 'f'},
{"image-opts", no_argument, 0, OPTION_IMAGE_OPTS},
+ {"cache", required_argument, 0, 't'},
+ {"drop", no_argument, 0, 'd'},
+ {"base", required_argument, 0, 'b'},
+ {"progress", no_argument, 0, 'p'},
+ {"rate", required_argument, 0, 'r'},
{0, 0, 0, 0}
};
c = getopt_long(argc, argv, ":f:ht:b:dpqr:",
@@ -1032,7 +1039,20 @@ static int img_commit(const char *cmdname, int argc,
char **argv)
unrecognized_option(cmdname, argv[optind - 1]);
break;
case 'h':
- help();
+ cmd_help(cmdname, "[OPTIONS] FILENAME",
+ "Commit changes recorded in FILENAME to its base image",
+" -q|--quiet - quiet operations\n"
+" -f|--format FMT - specify FILENAME image format explicitly\n"
+" --image-opts - indicates that FILENAME is a complete image specification\n"
+" instead of a file name (incompatible with --format)\n"
+" -t|--cache CACHE_MODE cache mode when opening image (" BDRV_DEFAULT_CACHE
")\n"
+" -d|--drop - skip emptying FILENAME on completion\n"
+" -b|--base BASE_IMG - image in the backing chain to which to commit\n"
+" changes instead of the previous one (implies --drop)\n"
+" -p|--progress - show operation progress\n"
+" -r|--rate RATE - I/O rate limit\n"
+" --object OBJDEF - QEMU user-creatable object (eg encryption key)\n"
+" FILENAME - name of the image file to operate on\n");
break;
case 'f':
fmt = optarg;
--
2.39.2
- [RFC/INCOMPLETE PATCH 0/8] Attempt to make qemu-img options consistent and --help working, Michael Tokarev, 2024/02/07
- [PATCH 1/8] qemu-img: pass current cmdname into command handlers, Michael Tokarev, 2024/02/07
- [PATCH 2/8] qemu-img: refresh options/--help for "create" subcommand, Michael Tokarev, 2024/02/07
- [PATCH 3/8] qemu-img: factor out parse_output_format() and use it in the code, Michael Tokarev, 2024/02/07
- [PATCH 4/8] qemu-img: refresh options/--help for "check" command, Michael Tokarev, 2024/02/07
- [PATCH 7/8] qemu-img: refresh options/--help for "compare" command, Michael Tokarev, 2024/02/07
- [PATCH 8/8] qemu-img: refresh options/--help for "convert" command, Michael Tokarev, 2024/02/07
- [PATCH 5/8] qemu-img: simplify --repair error message, Michael Tokarev, 2024/02/07
- [PATCH 6/8] qemu-img: refresh options/--help for "commit" command,
Michael Tokarev <=
- Re: [RFC/INCOMPLETE PATCH 0/8] Attempt to make qemu-img options consistent and --help working, Daniel P . Berrangé, 2024/02/07
- Re: [RFC/INCOMPLETE PATCH 0/8] Attempt to make qemu-img options consistent and --help working, Manos Pitsidianakis, 2024/02/07
- Re: [RFC/INCOMPLETE PATCH 0/8] Attempt to make qemu-img options consistent and --help working, Kevin Wolf, 2024/02/09