qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 7/8] qemu-img: refresh options/--help for "compare" command


From: Michael Tokarev
Subject: [PATCH 7/8] qemu-img: refresh options/--help for "compare" command
Date: Wed, 7 Feb 2024 20:58:16 +0300

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 qemu-img.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/qemu-img.c b/qemu-img.c
index 7ff63aeea2..ea3fe95169 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -1447,9 +1447,15 @@ static int img_compare(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},
+            {"cache", required_argument, 0, 'T'},
             {"image-opts", no_argument, 0, OPTION_IMAGE_OPTS},
+            {"format", required_argument, 0, 'f'},
+            {"format2?", required_argument, 0, 'F'},
             {"force-share", no_argument, 0, 'U'},
+            {"strict", no_argument, 0, 's'},
+            {"progress", no_argument, 0, 'p'},
             {0, 0, 0, 0}
         };
         c = getopt_long(argc, argv, ":hf:F:T:pqsU",
@@ -1465,7 +1471,18 @@ static int img_compare(const char *cmdname, int argc, 
char **argv)
             unrecognized_option(cmdname, argv[optind - 1]);
             break;
         case 'h':
-            help();
+            cmd_help(cmdname, "[OPTIONS] FILENAME1 FILENAME2",
+                     "Check if two images have the same content",
+" -q|--quiet - quiet operation\n"
+" -T|--cache - CACHE_MODE cache mode when opening images (" BDRV_DEFAULT_CACHE 
")\n"
+"  instead of file names (incompatible with --format)\n"
+" -f|--format FMT - specify FILENAME1 image format explicitly\n"
+" -F|--format2? FMT - specify FILENAME2 image format explicitly\n"
+" -U|--force-share - open images in shared mode for concurrent access\n"
+" -s|--strict - strict mode, also check if sizes are equal\n"
+" -p|--progress - show operation progress\n"
+" --object OBJDEF - QEMU user-creatable object (eg encryption key)\n"
+" FILENAME1, FILENAME2 - image files to compare\n");
             break;
         case 'f':
             fmt1 = optarg;
-- 
2.39.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]