[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/8] qemu-img: refresh options/--help for "check" command
From: |
Michael Tokarev |
Subject: |
[PATCH 4/8] qemu-img: refresh options/--help for "check" command |
Date: |
Wed, 7 Feb 2024 20:58:13 +0300 |
Add missing long options and --help output.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
qemu-img.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/qemu-img.c b/qemu-img.c
index f851b290cc..e7d5b1b24b 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -780,7 +780,9 @@ static int img_check(const char *cmdname, int argc, char
**argv)
int option_index = 0;
static const struct option long_options[] = {
{"help", no_argument, 0, 'h'},
+ {"quiet", no_argument, 0, 'q'},
{"format", required_argument, 0, 'f'},
+ {"cache", required_argument, 0, 'T'},
{"repair", required_argument, 0, 'r'},
{"output", required_argument, 0, OPTION_OUTPUT},
{"object", required_argument, 0, OPTION_OBJECT},
@@ -801,7 +803,20 @@ static int img_check(const char *cmdname, int argc, char
**argv)
unrecognized_option(cmdname, argv[optind - 1]);
break;
case 'h':
- help();
+ cmd_help(cmdname, "[OPTIONS] FILENAME",
+ "Checks image file validity",
+" -q|--quiet - quiet operations\n"
+" -f|--format FMT - specifies format of the image 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"
+" -U|--force-share - open image in shared mode for concurrent access\n"
+" --output human|json - output format\n"
+" -r|--repair leaks|all - repair particular aspect of the image\n"
+" (image will be open in read-write mode, incompatible with --force-share)\n"
+" --object OBJDEF - QEMU user-creatable object (eg encryption key)\n"
+" FILENAME - the image file (or image specification) 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 4/8] qemu-img: refresh options/--help for "check" command,
Michael Tokarev <=
- [PATCH 5/8] qemu-img: simplify --repair error message, 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 7/8] qemu-img: refresh options/--help for "compare" command, Michael Tokarev, 2024/02/07
- [PATCH 6/8] qemu-img: refresh options/--help for "commit" command, Michael Tokarev, 2024/02/07
- [PATCH 8/8] qemu-img: refresh options/--help for "convert" command, Michael Tokarev, 2024/02/07
- 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