All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/5] Various option help readability improvement suggestions
@ 2018-10-19 16:49 Max Reitz
  2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 1/5] option: Make option help nicer to read Max Reitz
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Max Reitz @ 2018-10-19 16:49 UTC (permalink / raw)
  To: qemu-block
  Cc: qemu-devel, Max Reitz, Marc-André Lureau, Markus Armbruster,
	Kevin Wolf

I noticed that with the (more or less) recent series from Marc-André the
output of qemu-img amend -f qcow2 -o help changed to this:

$ ./qemu-img amend -f qcow2 -o help
Creation options for 'qcow2':
qcow2-create-opts.backing_file=str - File name of a base image
qcow2-create-opts.backing_fmt=str - Image format of the base image
qcow2-create-opts.cluster_size=size - qcow2 cluster size
qcow2-create-opts.compat=str - Compatibility level (0.10 or 1.1)
[...]

The types are a nice addition, but I didn't like having the list name
printed in every single line (in fact, the list name does not make any
sense here at all, because there already is a caption which reads
"Creation options for 'qcow2'"), and I did not like the use of '=' for
types.

In general, I don't like the robot-y appearance, which is even worse in
things like -device virtio-blk,help, which gives you this (among
other lines):

> virtio-blk-pci.iothread=link<iothread>

Sadly, there isn't much we can do about the "link<iothread>", so this
series doesn't improve on that point.

What this series does do, however, is it changes these lists not to
print the list name on every single line, but only as a caption (and for
option lists, this caption is option, because the caller may want to
print a custom caption that is more expressive -- as is the case for
qemu-img amend -o help).

Consequentially, all list items are indented by two spaces to make clear
they belong to the caption.  I can already see that some people might
disagree on having this indentation, but I like it, so I have it in this
series.

Furthermore, types are now enclosed by angle brackets, and the alignment
we originally had for descriptions is restored (although now after 24
instead of 16 characters, because every option name is now accompanied
by indentation and a type).


Thus, after this series, the amend output looks like this:

$ ./qemu-img amend -f qcow2 -o help
Creation options for 'qcow2':
  backing_file=<str>     - File name of a base image
  backing_fmt=<str>      - Image format of the base image
  cluster_size=<size>    - qcow2 cluster size
  compat=<str>           - Compatibility level (0.10 or 1.1)
[...]


virtio-blk's list presents itself like so:

$ x86_64-softmmu/qemu-system-x86_64 -device virtio-blk,help
virtio-blk-pci options:
  iothread=<link<iothread>>
  request-merging=<bool> - on/off
  secs=<uint32>
[...]


And now we even print something when there are no options:

$ x86_64-softmmu/qemu-system-x86_64 -object can-bus,help
There are no options for can-bus.

(Before this series, there just is no output.)


As a side effect, patch 1 fixes iotest 082.


v2:
- Patch 1:
  - Abandon the "$name: $type" formatting in favor of "$name=<$type>"
    [Marc-André, at least the "abandon" part]
  - Restore description alignment [Kevin]
  - Do the alignment when generating each line's GString instead of when
    printing them.  This results in less lines modified and allows the
    compiler to optimize the printf("%s\n", x) to puts(x).
- Patch 3:
  - Same changes as above, with the addition of also separating the
    description with " - " instead of enclosing it in parentheses (to
    match the other places)
  - Also, we never did align the descriptions here, so this is not
    "restore" but "introduce description alignment".
- Patch 4:
  - Same as patch 1, but again with the catch of s/restore/introduce/.


git-backport-diff against v1:

Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/5:[0963] [FC] 'option: Make option help nicer to read'
002/5:[----] [--] 'chardev: Indent list of chardevs'
003/5:[0008] [FC] 'qdev-monitor: Make device options help nicer'
004/5:[0007] [FC] 'object: Make option help nicer to read'
005/5:[----] [--] 'fw_cfg: Drop newline in @file description'


Max Reitz (5):
  option: Make option help nicer to read
  chardev: Indent list of chardevs
  qdev-monitor: Make device options help nicer
  object: Make option help nicer to read
  fw_cfg: Drop newline in @file description

 include/qemu/option.h      |   2 +-
 chardev/char.c             |   2 +-
 qdev-monitor.c             |  13 +-
 qemu-img.c                 |   4 +-
 util/qemu-option.c         |  32 +-
 vl.c                       |  15 +-
 tests/qemu-iotests/082.out | 956 ++++++++++++++++++-------------------
 7 files changed, 530 insertions(+), 494 deletions(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Qemu-devel] [PATCH v2 1/5] option: Make option help nicer to read
  2018-10-19 16:49 [Qemu-devel] [PATCH v2 0/5] Various option help readability improvement suggestions Max Reitz
@ 2018-10-19 16:49 ` Max Reitz
  2018-11-05  8:14   ` Marc-André Lureau
  2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 2/5] chardev: Indent list of chardevs Max Reitz
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Max Reitz @ 2018-10-19 16:49 UTC (permalink / raw)
  To: qemu-block
  Cc: qemu-devel, Max Reitz, Marc-André Lureau, Markus Armbruster,
	Kevin Wolf

This adds some whitespace into the option help (including indentation)
and puts angle brackets around the type names.  Furthermore, the list
name is no longer printed as part of every line, but only once in
advance, and only if the caller did not print a caption already.

This patch also restores the description alignment we had before commit
9cbef9d68ee1d8d0, just at 24 instead of 16 characters like we used to.
This increase is because now we have the type and two spaces of
indentation before the description, and with a usual type name length of
three chracters, this sums up to eight additional characters -- which
means that we now need 24 characters to get the same amount of padding
for most options.  Also, 24 is a third of 80, which makes it kind of a
round number in terminal terms.

Finally, this patch amends the reference output of iotest 082 to match
the changes (and thus makes it pass again).

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 include/qemu/option.h      |   2 +-
 qemu-img.c                 |   4 +-
 util/qemu-option.c         |  32 +-
 tests/qemu-iotests/082.out | 956 ++++++++++++++++++-------------------
 4 files changed, 507 insertions(+), 487 deletions(-)

diff --git a/include/qemu/option.h b/include/qemu/option.h
index 3dfb4493cc..844587cab3 100644
--- a/include/qemu/option.h
+++ b/include/qemu/option.h
@@ -132,7 +132,7 @@ typedef int (*qemu_opts_loopfunc)(void *opaque, QemuOpts *opts, Error **errp);
 int qemu_opts_foreach(QemuOptsList *list, qemu_opts_loopfunc func,
                       void *opaque, Error **errp);
 void qemu_opts_print(QemuOpts *opts, const char *sep);
-void qemu_opts_print_help(QemuOptsList *list);
+void qemu_opts_print_help(QemuOptsList *list, bool print_caption);
 void qemu_opts_free(QemuOptsList *list);
 QemuOptsList *qemu_opts_append(QemuOptsList *dst, QemuOptsList *list);
 
diff --git a/qemu-img.c b/qemu-img.c
index b12f4cd19b..4c96db7ba4 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -269,7 +269,7 @@ static int print_block_option_help(const char *filename, const char *fmt)
     }
 
     printf("Supported options:\n");
-    qemu_opts_print_help(create_opts);
+    qemu_opts_print_help(create_opts, false);
     qemu_opts_free(create_opts);
     return 0;
 }
@@ -3773,7 +3773,7 @@ static int print_amend_option_help(const char *format)
     assert(drv->create_opts);
 
     printf("Creation options for '%s':\n", format);
-    qemu_opts_print_help(drv->create_opts);
+    qemu_opts_print_help(drv->create_opts, false);
     printf("\nNote that not all of these options may be amendable.\n");
     return 0;
 }
diff --git a/util/qemu-option.c b/util/qemu-option.c
index 9a5f263294..de42e2a406 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -224,7 +224,14 @@ static const char *opt_type_to_string(enum QemuOptType type)
     g_assert_not_reached();
 }
 
-void qemu_opts_print_help(QemuOptsList *list)
+/**
+ * Print the list of options available in the given list.  If
+ * @print_caption is true, a caption (including the list name, if it
+ * exists) is printed.  The options itself will be indented, so
+ * @print_caption should only be set to false if the caller prints its
+ * own custom caption (so that the indentation makes sense).
+ */
+void qemu_opts_print_help(QemuOptsList *list, bool print_caption)
 {
     QemuOptDesc *desc;
     int i;
@@ -234,12 +241,12 @@ void qemu_opts_print_help(QemuOptsList *list)
     desc = list->desc;
     while (desc && desc->name) {
         GString *str = g_string_new(NULL);
-        if (list->name) {
-            g_string_append_printf(str, "%s.", list->name);
-        }
-        g_string_append_printf(str, "%s=%s", desc->name,
+        g_string_append_printf(str, "  %s=<%s>", desc->name,
                                opt_type_to_string(desc->type));
         if (desc->help) {
+            if (str->len < 24) {
+                g_string_append_printf(str, "%*s", 24 - (int)str->len, "");
+            }
             g_string_append_printf(str, " - %s", desc->help);
         }
         g_ptr_array_add(array, g_string_free(str, false));
@@ -247,6 +254,19 @@ void qemu_opts_print_help(QemuOptsList *list)
     }
 
     g_ptr_array_sort(array, (GCompareFunc)qemu_pstrcmp0);
+    if (print_caption && array->len > 0) {
+        if (list->name) {
+            printf("%s options:\n", list->name);
+        } else {
+            printf("Options:\n");
+        }
+    } else if (array->len == 0) {
+        if (list->name) {
+            printf("There are no options for %s.\n", list->name);
+        } else {
+            printf("No options available.\n");
+        }
+    }
     for (i = 0; i < array->len; i++) {
         printf("%s\n", (char *)array->pdata[i]);
     }
@@ -930,7 +950,7 @@ QemuOpts *qemu_opts_parse_noisily(QemuOptsList *list, const char *params,
     opts = opts_parse(list, params, permit_abbrev, false, &invalidp, &err);
     if (err) {
         if (invalidp && has_help_option(params)) {
-            qemu_opts_print_help(list);
+            qemu_opts_print_help(list, true);
             error_free(err);
         } else {
             error_report_err(err);
diff --git a/tests/qemu-iotests/082.out b/tests/qemu-iotests/082.out
index 19e9fb13ff..0ce18c075b 100644
--- a/tests/qemu-iotests/082.out
+++ b/tests/qemu-iotests/082.out
@@ -44,171 +44,171 @@ cluster_size: 8192
 
 Testing: create -f qcow2 -o help TEST_DIR/t.qcow2 128M
 Supported options:
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
-nocow            Turn off copy-on-write (valid only on btrfs)
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Testing: create -f qcow2 -o ? TEST_DIR/t.qcow2 128M
 Supported options:
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
-nocow            Turn off copy-on-write (valid only on btrfs)
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Testing: create -f qcow2 -o cluster_size=4k,help TEST_DIR/t.qcow2 128M
 Supported options:
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
-nocow            Turn off copy-on-write (valid only on btrfs)
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Testing: create -f qcow2 -o cluster_size=4k,? TEST_DIR/t.qcow2 128M
 Supported options:
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
-nocow            Turn off copy-on-write (valid only on btrfs)
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Testing: create -f qcow2 -o help,cluster_size=4k TEST_DIR/t.qcow2 128M
 Supported options:
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
-nocow            Turn off copy-on-write (valid only on btrfs)
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Testing: create -f qcow2 -o ?,cluster_size=4k TEST_DIR/t.qcow2 128M
 Supported options:
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
-nocow            Turn off copy-on-write (valid only on btrfs)
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Testing: create -f qcow2 -o cluster_size=4k -o help TEST_DIR/t.qcow2 128M
 Supported options:
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
-nocow            Turn off copy-on-write (valid only on btrfs)
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Testing: create -f qcow2 -o cluster_size=4k -o ? TEST_DIR/t.qcow2 128M
 Supported options:
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
-nocow            Turn off copy-on-write (valid only on btrfs)
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Testing: create -f qcow2 -u -o backing_file=TEST_DIR/t.qcow2,,help TEST_DIR/t.qcow2 128M
 Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=134217728 backing_file=TEST_DIR/t.qcow2,,help cluster_size=65536 lazy_refcounts=off refcount_bits=16
@@ -227,27 +227,27 @@ qemu-img: Invalid option list: ,,
 
 Testing: create -f qcow2 -o help
 Supported options:
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Testing: create -o help
 Supported options:
-size             Virtual disk size
+  size=<size>            - Virtual disk size
 
 Testing: create -f bochs -o help
 qemu-img: Format driver 'bochs' does not support image creation
@@ -300,171 +300,171 @@ cluster_size: 8192
 
 Testing: convert -O qcow2 -o help TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
 Supported options:
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
-nocow            Turn off copy-on-write (valid only on btrfs)
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Testing: convert -O qcow2 -o ? TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
 Supported options:
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
-nocow            Turn off copy-on-write (valid only on btrfs)
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Testing: convert -O qcow2 -o cluster_size=4k,help TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
 Supported options:
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
-nocow            Turn off copy-on-write (valid only on btrfs)
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Testing: convert -O qcow2 -o cluster_size=4k,? TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
 Supported options:
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
-nocow            Turn off copy-on-write (valid only on btrfs)
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Testing: convert -O qcow2 -o help,cluster_size=4k TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
 Supported options:
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
-nocow            Turn off copy-on-write (valid only on btrfs)
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Testing: convert -O qcow2 -o ?,cluster_size=4k TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
 Supported options:
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
-nocow            Turn off copy-on-write (valid only on btrfs)
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Testing: convert -O qcow2 -o cluster_size=4k -o help TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
 Supported options:
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
-nocow            Turn off copy-on-write (valid only on btrfs)
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Testing: convert -O qcow2 -o cluster_size=4k -o ? TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
 Supported options:
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
-nocow            Turn off copy-on-write (valid only on btrfs)
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Testing: convert -O qcow2 -o backing_file=TEST_DIR/t.qcow2,,help TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
 qemu-img: Could not open 'TEST_DIR/t.qcow2.base': Could not open backing file: Could not open 'TEST_DIR/t.qcow2,help': No such file or directory
@@ -483,27 +483,27 @@ qemu-img: Invalid option list: ,,
 
 Testing: convert -O qcow2 -o help
 Supported options:
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Testing: convert -o help
 Supported options:
-size             Virtual disk size
+  size=<size>            - Virtual disk size
 
 Testing: convert -O bochs -o help
 qemu-img: Format driver 'bochs' does not support image creation
@@ -564,177 +564,177 @@ cluster_size: 65536
 
 Testing: amend -f qcow2 -o help TEST_DIR/t.qcow2
 Creation options for 'qcow2':
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Note that not all of these options may be amendable.
 
 Testing: amend -f qcow2 -o ? TEST_DIR/t.qcow2
 Creation options for 'qcow2':
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Note that not all of these options may be amendable.
 
 Testing: amend -f qcow2 -o cluster_size=4k,help TEST_DIR/t.qcow2
 Creation options for 'qcow2':
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Note that not all of these options may be amendable.
 
 Testing: amend -f qcow2 -o cluster_size=4k,? TEST_DIR/t.qcow2
 Creation options for 'qcow2':
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Note that not all of these options may be amendable.
 
 Testing: amend -f qcow2 -o help,cluster_size=4k TEST_DIR/t.qcow2
 Creation options for 'qcow2':
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Note that not all of these options may be amendable.
 
 Testing: amend -f qcow2 -o ?,cluster_size=4k TEST_DIR/t.qcow2
 Creation options for 'qcow2':
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Note that not all of these options may be amendable.
 
 Testing: amend -f qcow2 -o cluster_size=4k -o help TEST_DIR/t.qcow2
 Creation options for 'qcow2':
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Note that not all of these options may be amendable.
 
 Testing: amend -f qcow2 -o cluster_size=4k -o ? TEST_DIR/t.qcow2
 Creation options for 'qcow2':
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Note that not all of these options may be amendable.
 
@@ -757,29 +757,29 @@ qemu-img: Invalid option list: ,,
 
 Testing: amend -f qcow2 -o help
 Creation options for 'qcow2':
-size             Virtual disk size
-compat           Compatibility level (0.10 or 1.1)
-backing_file     File name of a base image
-backing_fmt      Image format of the base image
-encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
-encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
-encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
-encrypt.cipher-alg Name of encryption cipher algorithm
-encrypt.cipher-mode Name of encryption cipher mode
-encrypt.ivgen-alg Name of IV generator algorithm
-encrypt.ivgen-hash-alg Name of IV generator hash algorithm
-encrypt.hash-alg Name of encryption hash algorithm
-encrypt.iter-time Time to spend in PBKDF in milliseconds
-cluster_size     qcow2 cluster size
-preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
-lazy_refcounts   Postpone refcount updates
-refcount_bits    Width of a reference count entry in bits
+  backing_file=<str>     - File name of a base image
+  backing_fmt=<str>      - Image format of the base image
+  cluster_size=<size>    - qcow2 cluster size
+  compat=<str>           - Compatibility level (0.10 or 1.1)
+  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
+  encrypt.cipher-mode=<str> - Name of encryption cipher mode
+  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
+  encrypt.hash-alg=<str> - Name of encryption hash algorithm
+  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
+  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
+  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
+  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
+  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
+  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
+  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
+  refcount_bits=<num>    - Width of a reference count entry in bits
+  size=<size>            - Virtual disk size
 
 Note that not all of these options may be amendable.
 
 Testing: convert -o help
 Supported options:
-size             Virtual disk size
+  size=<size>            - Virtual disk size
 
 Testing: amend -f bochs -o help
 qemu-img: Format driver 'bochs' does not support option amendment
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Qemu-devel] [PATCH v2 2/5] chardev: Indent list of chardevs
  2018-10-19 16:49 [Qemu-devel] [PATCH v2 0/5] Various option help readability improvement suggestions Max Reitz
  2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 1/5] option: Make option help nicer to read Max Reitz
@ 2018-10-19 16:49 ` Max Reitz
  2018-11-05  8:14   ` Marc-André Lureau
  2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 3/5] qdev-monitor: Make device options help nicer Max Reitz
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Max Reitz @ 2018-10-19 16:49 UTC (permalink / raw)
  To: qemu-block
  Cc: qemu-devel, Max Reitz, Marc-André Lureau, Markus Armbruster,
	Kevin Wolf

Following the example of qemu_opts_print_help(), indent all entries in
the list of character devices.

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 chardev/char.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chardev/char.c b/chardev/char.c
index e115166995..10d44aaefc 100644
--- a/chardev/char.c
+++ b/chardev/char.c
@@ -569,7 +569,7 @@ help_string_append(const char *name, void *opaque)
 {
     GString *str = opaque;
 
-    g_string_append_printf(str, "\n%s", name);
+    g_string_append_printf(str, "\n  %s", name);
 }
 
 static const char *chardev_alias_translate(const char *name)
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Qemu-devel] [PATCH v2 3/5] qdev-monitor: Make device options help nicer
  2018-10-19 16:49 [Qemu-devel] [PATCH v2 0/5] Various option help readability improvement suggestions Max Reitz
  2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 1/5] option: Make option help nicer to read Max Reitz
  2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 2/5] chardev: Indent list of chardevs Max Reitz
@ 2018-10-19 16:49 ` Max Reitz
  2018-11-05  8:14   ` Marc-André Lureau
  2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 4/5] object: Make option help nicer to read Max Reitz
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Max Reitz @ 2018-10-19 16:49 UTC (permalink / raw)
  To: qemu-block
  Cc: qemu-devel, Max Reitz, Marc-André Lureau, Markus Armbruster,
	Kevin Wolf

Just like in qemu_opts_print_help(), print the device name as a caption
instead of on every single line, indent all options, add angle brackets
around types, and align the descriptions after 24 characters.  Also,
separate the descriptions with " - " instead of putting them in
parentheses, because that is what we do everywhere else.  This does look
a bit funny here because basically all bits have the description
"on/off", but funny does not mean it is less readable.

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 qdev-monitor.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/qdev-monitor.c b/qdev-monitor.c
index 802c18a74e..07147c63bf 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -285,10 +285,19 @@ int qdev_device_help(QemuOpts *opts)
         goto error;
     }
 
+    if (prop_list) {
+        out_printf("%s options:\n", driver);
+    } else {
+        out_printf("There are no options for %s.\n", driver);
+    }
     for (prop = prop_list; prop; prop = prop->next) {
-        out_printf("%s.%s=%s", driver, prop->value->name, prop->value->type);
+        int len;
+        out_printf("  %s=<%s>%n", prop->value->name, prop->value->type, &len);
         if (prop->value->has_description) {
-            out_printf(" (%s)\n", prop->value->description);
+            if (len < 24) {
+                out_printf("%*s", 24 - len, "");
+            }
+            out_printf(" - %s\n", prop->value->description);
         } else {
             out_printf("\n");
         }
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Qemu-devel] [PATCH v2 4/5] object: Make option help nicer to read
  2018-10-19 16:49 [Qemu-devel] [PATCH v2 0/5] Various option help readability improvement suggestions Max Reitz
                   ` (2 preceding siblings ...)
  2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 3/5] qdev-monitor: Make device options help nicer Max Reitz
@ 2018-10-19 16:49 ` Max Reitz
  2018-11-05  8:15   ` Marc-André Lureau
  2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 5/5] fw_cfg: Drop newline in @file description Max Reitz
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Max Reitz @ 2018-10-19 16:49 UTC (permalink / raw)
  To: qemu-block
  Cc: qemu-devel, Max Reitz, Marc-André Lureau, Markus Armbruster,
	Kevin Wolf

Just like in qemu_opts_print_help(), print the object name as a caption
instead of on every single line, indent all options, add angle brackets
around types, and align the descriptions after 24 characters.

Also, indent every object name in the list of available objects.

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 vl.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/vl.c b/vl.c
index ac3ed17de4..ecddbb6b8e 100644
--- a/vl.c
+++ b/vl.c
@@ -2707,7 +2707,7 @@ static bool object_create_initial(const char *type, QemuOpts *opts)
         list = object_class_get_list_sorted(TYPE_USER_CREATABLE, false);
         for (l = list; l != NULL; l = l->next) {
             ObjectClass *oc = OBJECT_CLASS(l->data);
-            printf("%s\n", object_class_get_name(oc));
+            printf("  %s\n", object_class_get_name(oc));
         }
         g_slist_free(list);
         exit(0);
@@ -2729,14 +2729,21 @@ static bool object_create_initial(const char *type, QemuOpts *opts)
             }
 
             str = g_string_new(NULL);
-            g_string_append_printf(str, "%s.%s=%s", type,
-                                   prop->name, prop->type);
+            g_string_append_printf(str, "  %s=<%s>", prop->name, prop->type);
             if (prop->description) {
+                if (str->len < 24) {
+                    g_string_append_printf(str, "%*s", 24 - (int)str->len, "");
+                }
                 g_string_append_printf(str, " - %s", prop->description);
             }
             g_ptr_array_add(array, g_string_free(str, false));
         }
         g_ptr_array_sort(array, (GCompareFunc)qemu_pstrcmp0);
+        if (array->len > 0) {
+            printf("%s options:\n", type);
+        } else {
+            printf("There are no options for %s.\n", type);
+        }
         for (i = 0; i < array->len; i++) {
             printf("%s\n", (char *)array->pdata[i]);
         }
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Qemu-devel] [PATCH v2 5/5] fw_cfg: Drop newline in @file description
  2018-10-19 16:49 [Qemu-devel] [PATCH v2 0/5] Various option help readability improvement suggestions Max Reitz
                   ` (3 preceding siblings ...)
  2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 4/5] object: Make option help nicer to read Max Reitz
@ 2018-10-19 16:49 ` Max Reitz
  2018-11-05  8:15   ` Marc-André Lureau
  2018-11-05  0:25 ` [Qemu-devel] [PATCH v2 0/5] Various option help readability improvement suggestions Max Reitz
  2018-11-05 14:18 ` Kevin Wolf
  6 siblings, 1 reply; 14+ messages in thread
From: Max Reitz @ 2018-10-19 16:49 UTC (permalink / raw)
  To: qemu-block
  Cc: qemu-devel, Max Reitz, Marc-André Lureau, Markus Armbruster,
	Kevin Wolf

There is no good reason why there should be a newline in this
description, so remove it.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 vl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vl.c b/vl.c
index ecddbb6b8e..6604648570 100644
--- a/vl.c
+++ b/vl.c
@@ -529,7 +529,7 @@ static QemuOptsList qemu_fw_cfg_opts = {
         }, {
             .name = "file",
             .type = QEMU_OPT_STRING,
-            .help = "Sets the name of the file from which\n"
+            .help = "Sets the name of the file from which "
                     "the fw_cfg blob will be loaded",
         }, {
             .name = "string",
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/5] Various option help readability improvement suggestions
  2018-10-19 16:49 [Qemu-devel] [PATCH v2 0/5] Various option help readability improvement suggestions Max Reitz
                   ` (4 preceding siblings ...)
  2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 5/5] fw_cfg: Drop newline in @file description Max Reitz
@ 2018-11-05  0:25 ` Max Reitz
  2018-11-05 14:18 ` Kevin Wolf
  6 siblings, 0 replies; 14+ messages in thread
From: Max Reitz @ 2018-11-05  0:25 UTC (permalink / raw)
  To: qemu-block
  Cc: qemu-devel, Marc-André Lureau, Markus Armbruster, Kevin Wolf

[-- Attachment #1: Type: text/plain, Size: 5263 bytes --]

Ping.  I don't quite want the help output to change in 3.1 only to
change it to something else in 3.2.

(And at some point into freeze we have to consider just merging one of
the many simple 082 reference output "fixes", which I really don't want,
because I still consider the test "broken for a reason"(tm).)

Max


On 19.10.18 18:49, Max Reitz wrote:
> I noticed that with the (more or less) recent series from Marc-André the
> output of qemu-img amend -f qcow2 -o help changed to this:
> 
> $ ./qemu-img amend -f qcow2 -o help
> Creation options for 'qcow2':
> qcow2-create-opts.backing_file=str - File name of a base image
> qcow2-create-opts.backing_fmt=str - Image format of the base image
> qcow2-create-opts.cluster_size=size - qcow2 cluster size
> qcow2-create-opts.compat=str - Compatibility level (0.10 or 1.1)
> [...]
> 
> The types are a nice addition, but I didn't like having the list name
> printed in every single line (in fact, the list name does not make any
> sense here at all, because there already is a caption which reads
> "Creation options for 'qcow2'"), and I did not like the use of '=' for
> types.
> 
> In general, I don't like the robot-y appearance, which is even worse in
> things like -device virtio-blk,help, which gives you this (among
> other lines):
> 
>> virtio-blk-pci.iothread=link<iothread>
> 
> Sadly, there isn't much we can do about the "link<iothread>", so this
> series doesn't improve on that point.
> 
> What this series does do, however, is it changes these lists not to
> print the list name on every single line, but only as a caption (and for
> option lists, this caption is option, because the caller may want to
> print a custom caption that is more expressive -- as is the case for
> qemu-img amend -o help).
> 
> Consequentially, all list items are indented by two spaces to make clear
> they belong to the caption.  I can already see that some people might
> disagree on having this indentation, but I like it, so I have it in this
> series.
> 
> Furthermore, types are now enclosed by angle brackets, and the alignment
> we originally had for descriptions is restored (although now after 24
> instead of 16 characters, because every option name is now accompanied
> by indentation and a type).
> 
> 
> Thus, after this series, the amend output looks like this:
> 
> $ ./qemu-img amend -f qcow2 -o help
> Creation options for 'qcow2':
>   backing_file=<str>     - File name of a base image
>   backing_fmt=<str>      - Image format of the base image
>   cluster_size=<size>    - qcow2 cluster size
>   compat=<str>           - Compatibility level (0.10 or 1.1)
> [...]
> 
> 
> virtio-blk's list presents itself like so:
> 
> $ x86_64-softmmu/qemu-system-x86_64 -device virtio-blk,help
> virtio-blk-pci options:
>   iothread=<link<iothread>>
>   request-merging=<bool> - on/off
>   secs=<uint32>
> [...]
> 
> 
> And now we even print something when there are no options:
> 
> $ x86_64-softmmu/qemu-system-x86_64 -object can-bus,help
> There are no options for can-bus.
> 
> (Before this series, there just is no output.)
> 
> 
> As a side effect, patch 1 fixes iotest 082.
> 
> 
> v2:
> - Patch 1:
>   - Abandon the "$name: $type" formatting in favor of "$name=<$type>"
>     [Marc-André, at least the "abandon" part]
>   - Restore description alignment [Kevin]
>   - Do the alignment when generating each line's GString instead of when
>     printing them.  This results in less lines modified and allows the
>     compiler to optimize the printf("%s\n", x) to puts(x).
> - Patch 3:
>   - Same changes as above, with the addition of also separating the
>     description with " - " instead of enclosing it in parentheses (to
>     match the other places)
>   - Also, we never did align the descriptions here, so this is not
>     "restore" but "introduce description alignment".
> - Patch 4:
>   - Same as patch 1, but again with the catch of s/restore/introduce/.
> 
> 
> git-backport-diff against v1:
> 
> Key:
> [----] : patches are identical
> [####] : number of functional differences between upstream/downstream patch
> [down] : patch is downstream-only
> The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively
> 
> 001/5:[0963] [FC] 'option: Make option help nicer to read'
> 002/5:[----] [--] 'chardev: Indent list of chardevs'
> 003/5:[0008] [FC] 'qdev-monitor: Make device options help nicer'
> 004/5:[0007] [FC] 'object: Make option help nicer to read'
> 005/5:[----] [--] 'fw_cfg: Drop newline in @file description'
> 
> 
> Max Reitz (5):
>   option: Make option help nicer to read
>   chardev: Indent list of chardevs
>   qdev-monitor: Make device options help nicer
>   object: Make option help nicer to read
>   fw_cfg: Drop newline in @file description
> 
>  include/qemu/option.h      |   2 +-
>  chardev/char.c             |   2 +-
>  qdev-monitor.c             |  13 +-
>  qemu-img.c                 |   4 +-
>  util/qemu-option.c         |  32 +-
>  vl.c                       |  15 +-
>  tests/qemu-iotests/082.out | 956 ++++++++++++++++++-------------------
>  7 files changed, 530 insertions(+), 494 deletions(-)
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH v2 1/5] option: Make option help nicer to read
  2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 1/5] option: Make option help nicer to read Max Reitz
@ 2018-11-05  8:14   ` Marc-André Lureau
  0 siblings, 0 replies; 14+ messages in thread
From: Marc-André Lureau @ 2018-11-05  8:14 UTC (permalink / raw)
  To: Max Reitz; +Cc: qemu-block, qemu-devel, Armbruster, Markus, Wolf, Kevin

On Fri, Oct 19, 2018 at 8:49 PM Max Reitz <mreitz@redhat.com> wrote:
>
> This adds some whitespace into the option help (including indentation)
> and puts angle brackets around the type names.  Furthermore, the list
> name is no longer printed as part of every line, but only once in
> advance, and only if the caller did not print a caption already.
>
> This patch also restores the description alignment we had before commit
> 9cbef9d68ee1d8d0, just at 24 instead of 16 characters like we used to.
> This increase is because now we have the type and two spaces of
> indentation before the description, and with a usual type name length of
> three chracters, this sums up to eight additional characters -- which
> means that we now need 24 characters to get the same amount of padding
> for most options.  Also, 24 is a third of 80, which makes it kind of a
> round number in terminal terms.
>
> Finally, this patch amends the reference output of iotest 082 to match
> the changes (and thus makes it pass again).
>
> Signed-off-by: Max Reitz <mreitz@redhat.com>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

> ---
>  include/qemu/option.h      |   2 +-
>  qemu-img.c                 |   4 +-
>  util/qemu-option.c         |  32 +-
>  tests/qemu-iotests/082.out | 956 ++++++++++++++++++-------------------
>  4 files changed, 507 insertions(+), 487 deletions(-)
>
> diff --git a/include/qemu/option.h b/include/qemu/option.h
> index 3dfb4493cc..844587cab3 100644
> --- a/include/qemu/option.h
> +++ b/include/qemu/option.h
> @@ -132,7 +132,7 @@ typedef int (*qemu_opts_loopfunc)(void *opaque, QemuOpts *opts, Error **errp);
>  int qemu_opts_foreach(QemuOptsList *list, qemu_opts_loopfunc func,
>                        void *opaque, Error **errp);
>  void qemu_opts_print(QemuOpts *opts, const char *sep);
> -void qemu_opts_print_help(QemuOptsList *list);
> +void qemu_opts_print_help(QemuOptsList *list, bool print_caption);
>  void qemu_opts_free(QemuOptsList *list);
>  QemuOptsList *qemu_opts_append(QemuOptsList *dst, QemuOptsList *list);
>
> diff --git a/qemu-img.c b/qemu-img.c
> index b12f4cd19b..4c96db7ba4 100644
> --- a/qemu-img.c
> +++ b/qemu-img.c
> @@ -269,7 +269,7 @@ static int print_block_option_help(const char *filename, const char *fmt)
>      }
>
>      printf("Supported options:\n");
> -    qemu_opts_print_help(create_opts);
> +    qemu_opts_print_help(create_opts, false);
>      qemu_opts_free(create_opts);
>      return 0;
>  }
> @@ -3773,7 +3773,7 @@ static int print_amend_option_help(const char *format)
>      assert(drv->create_opts);
>
>      printf("Creation options for '%s':\n", format);
> -    qemu_opts_print_help(drv->create_opts);
> +    qemu_opts_print_help(drv->create_opts, false);
>      printf("\nNote that not all of these options may be amendable.\n");
>      return 0;
>  }
> diff --git a/util/qemu-option.c b/util/qemu-option.c
> index 9a5f263294..de42e2a406 100644
> --- a/util/qemu-option.c
> +++ b/util/qemu-option.c
> @@ -224,7 +224,14 @@ static const char *opt_type_to_string(enum QemuOptType type)
>      g_assert_not_reached();
>  }
>
> -void qemu_opts_print_help(QemuOptsList *list)
> +/**
> + * Print the list of options available in the given list.  If
> + * @print_caption is true, a caption (including the list name, if it
> + * exists) is printed.  The options itself will be indented, so
> + * @print_caption should only be set to false if the caller prints its
> + * own custom caption (so that the indentation makes sense).
> + */
> +void qemu_opts_print_help(QemuOptsList *list, bool print_caption)
>  {
>      QemuOptDesc *desc;
>      int i;
> @@ -234,12 +241,12 @@ void qemu_opts_print_help(QemuOptsList *list)
>      desc = list->desc;
>      while (desc && desc->name) {
>          GString *str = g_string_new(NULL);
> -        if (list->name) {
> -            g_string_append_printf(str, "%s.", list->name);
> -        }
> -        g_string_append_printf(str, "%s=%s", desc->name,
> +        g_string_append_printf(str, "  %s=<%s>", desc->name,
>                                 opt_type_to_string(desc->type));
>          if (desc->help) {
> +            if (str->len < 24) {
> +                g_string_append_printf(str, "%*s", 24 - (int)str->len, "");
> +            }
>              g_string_append_printf(str, " - %s", desc->help);
>          }
>          g_ptr_array_add(array, g_string_free(str, false));
> @@ -247,6 +254,19 @@ void qemu_opts_print_help(QemuOptsList *list)
>      }
>
>      g_ptr_array_sort(array, (GCompareFunc)qemu_pstrcmp0);
> +    if (print_caption && array->len > 0) {
> +        if (list->name) {
> +            printf("%s options:\n", list->name);
> +        } else {
> +            printf("Options:\n");
> +        }
> +    } else if (array->len == 0) {
> +        if (list->name) {
> +            printf("There are no options for %s.\n", list->name);
> +        } else {
> +            printf("No options available.\n");
> +        }
> +    }
>      for (i = 0; i < array->len; i++) {
>          printf("%s\n", (char *)array->pdata[i]);
>      }
> @@ -930,7 +950,7 @@ QemuOpts *qemu_opts_parse_noisily(QemuOptsList *list, const char *params,
>      opts = opts_parse(list, params, permit_abbrev, false, &invalidp, &err);
>      if (err) {
>          if (invalidp && has_help_option(params)) {
> -            qemu_opts_print_help(list);
> +            qemu_opts_print_help(list, true);
>              error_free(err);
>          } else {
>              error_report_err(err);
> diff --git a/tests/qemu-iotests/082.out b/tests/qemu-iotests/082.out
> index 19e9fb13ff..0ce18c075b 100644
> --- a/tests/qemu-iotests/082.out
> +++ b/tests/qemu-iotests/082.out
> @@ -44,171 +44,171 @@ cluster_size: 8192
>
>  Testing: create -f qcow2 -o help TEST_DIR/t.qcow2 128M
>  Supported options:
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> -nocow            Turn off copy-on-write (valid only on btrfs)
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Testing: create -f qcow2 -o ? TEST_DIR/t.qcow2 128M
>  Supported options:
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> -nocow            Turn off copy-on-write (valid only on btrfs)
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Testing: create -f qcow2 -o cluster_size=4k,help TEST_DIR/t.qcow2 128M
>  Supported options:
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> -nocow            Turn off copy-on-write (valid only on btrfs)
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Testing: create -f qcow2 -o cluster_size=4k,? TEST_DIR/t.qcow2 128M
>  Supported options:
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> -nocow            Turn off copy-on-write (valid only on btrfs)
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Testing: create -f qcow2 -o help,cluster_size=4k TEST_DIR/t.qcow2 128M
>  Supported options:
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> -nocow            Turn off copy-on-write (valid only on btrfs)
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Testing: create -f qcow2 -o ?,cluster_size=4k TEST_DIR/t.qcow2 128M
>  Supported options:
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> -nocow            Turn off copy-on-write (valid only on btrfs)
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Testing: create -f qcow2 -o cluster_size=4k -o help TEST_DIR/t.qcow2 128M
>  Supported options:
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> -nocow            Turn off copy-on-write (valid only on btrfs)
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Testing: create -f qcow2 -o cluster_size=4k -o ? TEST_DIR/t.qcow2 128M
>  Supported options:
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> -nocow            Turn off copy-on-write (valid only on btrfs)
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Testing: create -f qcow2 -u -o backing_file=TEST_DIR/t.qcow2,,help TEST_DIR/t.qcow2 128M
>  Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=134217728 backing_file=TEST_DIR/t.qcow2,,help cluster_size=65536 lazy_refcounts=off refcount_bits=16
> @@ -227,27 +227,27 @@ qemu-img: Invalid option list: ,,
>
>  Testing: create -f qcow2 -o help
>  Supported options:
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Testing: create -o help
>  Supported options:
> -size             Virtual disk size
> +  size=<size>            - Virtual disk size
>
>  Testing: create -f bochs -o help
>  qemu-img: Format driver 'bochs' does not support image creation
> @@ -300,171 +300,171 @@ cluster_size: 8192
>
>  Testing: convert -O qcow2 -o help TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
>  Supported options:
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> -nocow            Turn off copy-on-write (valid only on btrfs)
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Testing: convert -O qcow2 -o ? TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
>  Supported options:
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> -nocow            Turn off copy-on-write (valid only on btrfs)
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Testing: convert -O qcow2 -o cluster_size=4k,help TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
>  Supported options:
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> -nocow            Turn off copy-on-write (valid only on btrfs)
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Testing: convert -O qcow2 -o cluster_size=4k,? TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
>  Supported options:
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> -nocow            Turn off copy-on-write (valid only on btrfs)
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Testing: convert -O qcow2 -o help,cluster_size=4k TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
>  Supported options:
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> -nocow            Turn off copy-on-write (valid only on btrfs)
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Testing: convert -O qcow2 -o ?,cluster_size=4k TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
>  Supported options:
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> -nocow            Turn off copy-on-write (valid only on btrfs)
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Testing: convert -O qcow2 -o cluster_size=4k -o help TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
>  Supported options:
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> -nocow            Turn off copy-on-write (valid only on btrfs)
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Testing: convert -O qcow2 -o cluster_size=4k -o ? TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
>  Supported options:
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> -nocow            Turn off copy-on-write (valid only on btrfs)
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  nocow=<bool (on/off)>  - Turn off copy-on-write (valid only on btrfs)
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Testing: convert -O qcow2 -o backing_file=TEST_DIR/t.qcow2,,help TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
>  qemu-img: Could not open 'TEST_DIR/t.qcow2.base': Could not open backing file: Could not open 'TEST_DIR/t.qcow2,help': No such file or directory
> @@ -483,27 +483,27 @@ qemu-img: Invalid option list: ,,
>
>  Testing: convert -O qcow2 -o help
>  Supported options:
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Testing: convert -o help
>  Supported options:
> -size             Virtual disk size
> +  size=<size>            - Virtual disk size
>
>  Testing: convert -O bochs -o help
>  qemu-img: Format driver 'bochs' does not support image creation
> @@ -564,177 +564,177 @@ cluster_size: 65536
>
>  Testing: amend -f qcow2 -o help TEST_DIR/t.qcow2
>  Creation options for 'qcow2':
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Note that not all of these options may be amendable.
>
>  Testing: amend -f qcow2 -o ? TEST_DIR/t.qcow2
>  Creation options for 'qcow2':
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Note that not all of these options may be amendable.
>
>  Testing: amend -f qcow2 -o cluster_size=4k,help TEST_DIR/t.qcow2
>  Creation options for 'qcow2':
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Note that not all of these options may be amendable.
>
>  Testing: amend -f qcow2 -o cluster_size=4k,? TEST_DIR/t.qcow2
>  Creation options for 'qcow2':
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Note that not all of these options may be amendable.
>
>  Testing: amend -f qcow2 -o help,cluster_size=4k TEST_DIR/t.qcow2
>  Creation options for 'qcow2':
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Note that not all of these options may be amendable.
>
>  Testing: amend -f qcow2 -o ?,cluster_size=4k TEST_DIR/t.qcow2
>  Creation options for 'qcow2':
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Note that not all of these options may be amendable.
>
>  Testing: amend -f qcow2 -o cluster_size=4k -o help TEST_DIR/t.qcow2
>  Creation options for 'qcow2':
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Note that not all of these options may be amendable.
>
>  Testing: amend -f qcow2 -o cluster_size=4k -o ? TEST_DIR/t.qcow2
>  Creation options for 'qcow2':
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Note that not all of these options may be amendable.
>
> @@ -757,29 +757,29 @@ qemu-img: Invalid option list: ,,
>
>  Testing: amend -f qcow2 -o help
>  Creation options for 'qcow2':
> -size             Virtual disk size
> -compat           Compatibility level (0.10 or 1.1)
> -backing_file     File name of a base image
> -backing_fmt      Image format of the base image
> -encryption       Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> -encrypt.format   Encrypt the image, format choices: 'aes', 'luks'
> -encrypt.key-secret ID of secret providing qcow AES key or LUKS passphrase
> -encrypt.cipher-alg Name of encryption cipher algorithm
> -encrypt.cipher-mode Name of encryption cipher mode
> -encrypt.ivgen-alg Name of IV generator algorithm
> -encrypt.ivgen-hash-alg Name of IV generator hash algorithm
> -encrypt.hash-alg Name of encryption hash algorithm
> -encrypt.iter-time Time to spend in PBKDF in milliseconds
> -cluster_size     qcow2 cluster size
> -preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
> -lazy_refcounts   Postpone refcount updates
> -refcount_bits    Width of a reference count entry in bits
> +  backing_file=<str>     - File name of a base image
> +  backing_fmt=<str>      - Image format of the base image
> +  cluster_size=<size>    - qcow2 cluster size
> +  compat=<str>           - Compatibility level (0.10 or 1.1)
> +  encrypt.cipher-alg=<str> - Name of encryption cipher algorithm
> +  encrypt.cipher-mode=<str> - Name of encryption cipher mode
> +  encrypt.format=<str>   - Encrypt the image, format choices: 'aes', 'luks'
> +  encrypt.hash-alg=<str> - Name of encryption hash algorithm
> +  encrypt.iter-time=<num> - Time to spend in PBKDF in milliseconds
> +  encrypt.ivgen-alg=<str> - Name of IV generator algorithm
> +  encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm
> +  encrypt.key-secret=<str> - ID of secret providing qcow AES key or LUKS passphrase
> +  encryption=<bool (on/off)> - Encrypt the image with format 'aes'. (Deprecated in favor of encrypt.format=aes)
> +  lazy_refcounts=<bool (on/off)> - Postpone refcount updates
> +  preallocation=<str>    - Preallocation mode (allowed values: off, metadata, falloc, full)
> +  refcount_bits=<num>    - Width of a reference count entry in bits
> +  size=<size>            - Virtual disk size
>
>  Note that not all of these options may be amendable.
>
>  Testing: convert -o help
>  Supported options:
> -size             Virtual disk size
> +  size=<size>            - Virtual disk size
>
>  Testing: amend -f bochs -o help
>  qemu-img: Format driver 'bochs' does not support option amendment
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH v2 2/5] chardev: Indent list of chardevs
  2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 2/5] chardev: Indent list of chardevs Max Reitz
@ 2018-11-05  8:14   ` Marc-André Lureau
  0 siblings, 0 replies; 14+ messages in thread
From: Marc-André Lureau @ 2018-11-05  8:14 UTC (permalink / raw)
  To: Max Reitz; +Cc: qemu-block, qemu-devel, Armbruster, Markus, Wolf, Kevin

On Fri, Oct 19, 2018 at 8:49 PM Max Reitz <mreitz@redhat.com> wrote:
>
> Following the example of qemu_opts_print_help(), indent all entries in
> the list of character devices.
>
> Signed-off-by: Max Reitz <mreitz@redhat.com>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

> ---
>  chardev/char.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/chardev/char.c b/chardev/char.c
> index e115166995..10d44aaefc 100644
> --- a/chardev/char.c
> +++ b/chardev/char.c
> @@ -569,7 +569,7 @@ help_string_append(const char *name, void *opaque)
>  {
>      GString *str = opaque;
>
> -    g_string_append_printf(str, "\n%s", name);
> +    g_string_append_printf(str, "\n  %s", name);
>  }
>
>  static const char *chardev_alias_translate(const char *name)
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH v2 3/5] qdev-monitor: Make device options help nicer
  2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 3/5] qdev-monitor: Make device options help nicer Max Reitz
@ 2018-11-05  8:14   ` Marc-André Lureau
  0 siblings, 0 replies; 14+ messages in thread
From: Marc-André Lureau @ 2018-11-05  8:14 UTC (permalink / raw)
  To: Max Reitz; +Cc: qemu-block, qemu-devel, Armbruster, Markus, Wolf, Kevin

On Fri, Oct 19, 2018 at 8:49 PM Max Reitz <mreitz@redhat.com> wrote:
>
> Just like in qemu_opts_print_help(), print the device name as a caption
> instead of on every single line, indent all options, add angle brackets
> around types, and align the descriptions after 24 characters.  Also,
> separate the descriptions with " - " instead of putting them in
> parentheses, because that is what we do everywhere else.  This does look
> a bit funny here because basically all bits have the description
> "on/off", but funny does not mean it is less readable.
>
> Signed-off-by: Max Reitz <mreitz@redhat.com>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

> ---
>  qdev-monitor.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/qdev-monitor.c b/qdev-monitor.c
> index 802c18a74e..07147c63bf 100644
> --- a/qdev-monitor.c
> +++ b/qdev-monitor.c
> @@ -285,10 +285,19 @@ int qdev_device_help(QemuOpts *opts)
>          goto error;
>      }
>
> +    if (prop_list) {
> +        out_printf("%s options:\n", driver);
> +    } else {
> +        out_printf("There are no options for %s.\n", driver);
> +    }
>      for (prop = prop_list; prop; prop = prop->next) {
> -        out_printf("%s.%s=%s", driver, prop->value->name, prop->value->type);
> +        int len;
> +        out_printf("  %s=<%s>%n", prop->value->name, prop->value->type, &len);
>          if (prop->value->has_description) {
> -            out_printf(" (%s)\n", prop->value->description);
> +            if (len < 24) {
> +                out_printf("%*s", 24 - len, "");
> +            }
> +            out_printf(" - %s\n", prop->value->description);
>          } else {
>              out_printf("\n");
>          }
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH v2 4/5] object: Make option help nicer to read
  2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 4/5] object: Make option help nicer to read Max Reitz
@ 2018-11-05  8:15   ` Marc-André Lureau
  0 siblings, 0 replies; 14+ messages in thread
From: Marc-André Lureau @ 2018-11-05  8:15 UTC (permalink / raw)
  To: Max Reitz; +Cc: qemu-block, qemu-devel, Armbruster, Markus, Wolf, Kevin

On Fri, Oct 19, 2018 at 8:49 PM Max Reitz <mreitz@redhat.com> wrote:
>
> Just like in qemu_opts_print_help(), print the object name as a caption
> instead of on every single line, indent all options, add angle brackets
> around types, and align the descriptions after 24 characters.
>
> Also, indent every object name in the list of available objects.
>
> Signed-off-by: Max Reitz <mreitz@redhat.com>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

> ---
>  vl.c | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index ac3ed17de4..ecddbb6b8e 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -2707,7 +2707,7 @@ static bool object_create_initial(const char *type, QemuOpts *opts)
>          list = object_class_get_list_sorted(TYPE_USER_CREATABLE, false);
>          for (l = list; l != NULL; l = l->next) {
>              ObjectClass *oc = OBJECT_CLASS(l->data);
> -            printf("%s\n", object_class_get_name(oc));
> +            printf("  %s\n", object_class_get_name(oc));
>          }
>          g_slist_free(list);
>          exit(0);
> @@ -2729,14 +2729,21 @@ static bool object_create_initial(const char *type, QemuOpts *opts)
>              }
>
>              str = g_string_new(NULL);
> -            g_string_append_printf(str, "%s.%s=%s", type,
> -                                   prop->name, prop->type);
> +            g_string_append_printf(str, "  %s=<%s>", prop->name, prop->type);
>              if (prop->description) {
> +                if (str->len < 24) {
> +                    g_string_append_printf(str, "%*s", 24 - (int)str->len, "");
> +                }
>                  g_string_append_printf(str, " - %s", prop->description);
>              }
>              g_ptr_array_add(array, g_string_free(str, false));
>          }
>          g_ptr_array_sort(array, (GCompareFunc)qemu_pstrcmp0);
> +        if (array->len > 0) {
> +            printf("%s options:\n", type);
> +        } else {
> +            printf("There are no options for %s.\n", type);
> +        }
>          for (i = 0; i < array->len; i++) {
>              printf("%s\n", (char *)array->pdata[i]);
>          }
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH v2 5/5] fw_cfg: Drop newline in @file description
  2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 5/5] fw_cfg: Drop newline in @file description Max Reitz
@ 2018-11-05  8:15   ` Marc-André Lureau
  0 siblings, 0 replies; 14+ messages in thread
From: Marc-André Lureau @ 2018-11-05  8:15 UTC (permalink / raw)
  To: Max Reitz; +Cc: qemu-block, qemu-devel, Armbruster, Markus, Wolf, Kevin

On Fri, Oct 19, 2018 at 8:50 PM Max Reitz <mreitz@redhat.com> wrote:
>
> There is no good reason why there should be a newline in this
> description, so remove it.
>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

> ---
>  vl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/vl.c b/vl.c
> index ecddbb6b8e..6604648570 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -529,7 +529,7 @@ static QemuOptsList qemu_fw_cfg_opts = {
>          }, {
>              .name = "file",
>              .type = QEMU_OPT_STRING,
> -            .help = "Sets the name of the file from which\n"
> +            .help = "Sets the name of the file from which "
>                      "the fw_cfg blob will be loaded",
>          }, {
>              .name = "string",
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/5] Various option help readability improvement suggestions
  2018-10-19 16:49 [Qemu-devel] [PATCH v2 0/5] Various option help readability improvement suggestions Max Reitz
                   ` (5 preceding siblings ...)
  2018-11-05  0:25 ` [Qemu-devel] [PATCH v2 0/5] Various option help readability improvement suggestions Max Reitz
@ 2018-11-05 14:18 ` Kevin Wolf
  2018-11-06  0:35   ` Max Reitz
  6 siblings, 1 reply; 14+ messages in thread
From: Kevin Wolf @ 2018-11-05 14:18 UTC (permalink / raw)
  To: Max Reitz
  Cc: qemu-block, qemu-devel, Marc-André Lureau, Markus Armbruster

Am 19.10.2018 um 18:49 hat Max Reitz geschrieben:
> I noticed that with the (more or less) recent series from Marc-André the
> output of qemu-img amend -f qcow2 -o help changed to this:
> 
> $ ./qemu-img amend -f qcow2 -o help
> Creation options for 'qcow2':
> qcow2-create-opts.backing_file=str - File name of a base image
> qcow2-create-opts.backing_fmt=str - Image format of the base image
> qcow2-create-opts.cluster_size=size - qcow2 cluster size
> qcow2-create-opts.compat=str - Compatibility level (0.10 or 1.1)
> [...]
> 
> The types are a nice addition, but I didn't like having the list name
> printed in every single line (in fact, the list name does not make any
> sense here at all, because there already is a caption which reads
> "Creation options for 'qcow2'"), and I did not like the use of '=' for
> types.
> 
> In general, I don't like the robot-y appearance, which is even worse in
> things like -device virtio-blk,help, which gives you this (among
> other lines):
> 
> > virtio-blk-pci.iothread=link<iothread>
> 
> Sadly, there isn't much we can do about the "link<iothread>", so this
> series doesn't improve on that point.
> 
> What this series does do, however, is it changes these lists not to
> print the list name on every single line, but only as a caption (and for
> option lists, this caption is option, because the caller may want to
> print a custom caption that is more expressive -- as is the case for
> qemu-img amend -o help).
> 
> Consequentially, all list items are indented by two spaces to make clear
> they belong to the caption.  I can already see that some people might
> disagree on having this indentation, but I like it, so I have it in this
> series.
> 
> Furthermore, types are now enclosed by angle brackets, and the alignment
> we originally had for descriptions is restored (although now after 24
> instead of 16 characters, because every option name is now accompanied
> by indentation and a type).
> 
> 
> Thus, after this series, the amend output looks like this:
> 
> $ ./qemu-img amend -f qcow2 -o help
> Creation options for 'qcow2':
>   backing_file=<str>     - File name of a base image
>   backing_fmt=<str>      - Image format of the base image
>   cluster_size=<size>    - qcow2 cluster size
>   compat=<str>           - Compatibility level (0.10 or 1.1)
> [...]
> 
> 
> virtio-blk's list presents itself like so:
> 
> $ x86_64-softmmu/qemu-system-x86_64 -device virtio-blk,help
> virtio-blk-pci options:
>   iothread=<link<iothread>>
>   request-merging=<bool> - on/off
>   secs=<uint32>
> [...]
> 
> 
> And now we even print something when there are no options:
> 
> $ x86_64-softmmu/qemu-system-x86_64 -object can-bus,help
> There are no options for can-bus.
> 
> (Before this series, there just is no output.)
> 
> 
> As a side effect, patch 1 fixes iotest 082.

Thanks, applied to the block branch.

Kevin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/5] Various option help readability improvement suggestions
  2018-11-05 14:18 ` Kevin Wolf
@ 2018-11-06  0:35   ` Max Reitz
  0 siblings, 0 replies; 14+ messages in thread
From: Max Reitz @ 2018-11-06  0:35 UTC (permalink / raw)
  To: Kevin Wolf
  Cc: qemu-block, qemu-devel, Marc-André Lureau, Markus Armbruster

[-- Attachment #1: Type: text/plain, Size: 3090 bytes --]

On 05.11.18 15:18, Kevin Wolf wrote:
> Am 19.10.2018 um 18:49 hat Max Reitz geschrieben:
>> I noticed that with the (more or less) recent series from Marc-André the
>> output of qemu-img amend -f qcow2 -o help changed to this:
>>
>> $ ./qemu-img amend -f qcow2 -o help
>> Creation options for 'qcow2':
>> qcow2-create-opts.backing_file=str - File name of a base image
>> qcow2-create-opts.backing_fmt=str - Image format of the base image
>> qcow2-create-opts.cluster_size=size - qcow2 cluster size
>> qcow2-create-opts.compat=str - Compatibility level (0.10 or 1.1)
>> [...]
>>
>> The types are a nice addition, but I didn't like having the list name
>> printed in every single line (in fact, the list name does not make any
>> sense here at all, because there already is a caption which reads
>> "Creation options for 'qcow2'"), and I did not like the use of '=' for
>> types.
>>
>> In general, I don't like the robot-y appearance, which is even worse in
>> things like -device virtio-blk,help, which gives you this (among
>> other lines):
>>
>>> virtio-blk-pci.iothread=link<iothread>
>>
>> Sadly, there isn't much we can do about the "link<iothread>", so this
>> series doesn't improve on that point.
>>
>> What this series does do, however, is it changes these lists not to
>> print the list name on every single line, but only as a caption (and for
>> option lists, this caption is option, because the caller may want to
>> print a custom caption that is more expressive -- as is the case for
>> qemu-img amend -o help).
>>
>> Consequentially, all list items are indented by two spaces to make clear
>> they belong to the caption.  I can already see that some people might
>> disagree on having this indentation, but I like it, so I have it in this
>> series.
>>
>> Furthermore, types are now enclosed by angle brackets, and the alignment
>> we originally had for descriptions is restored (although now after 24
>> instead of 16 characters, because every option name is now accompanied
>> by indentation and a type).
>>
>>
>> Thus, after this series, the amend output looks like this:
>>
>> $ ./qemu-img amend -f qcow2 -o help
>> Creation options for 'qcow2':
>>   backing_file=<str>     - File name of a base image
>>   backing_fmt=<str>      - Image format of the base image
>>   cluster_size=<size>    - qcow2 cluster size
>>   compat=<str>           - Compatibility level (0.10 or 1.1)
>> [...]
>>
>>
>> virtio-blk's list presents itself like so:
>>
>> $ x86_64-softmmu/qemu-system-x86_64 -device virtio-blk,help
>> virtio-blk-pci options:
>>   iothread=<link<iothread>>
>>   request-merging=<bool> - on/off
>>   secs=<uint32>
>> [...]
>>
>>
>> And now we even print something when there are no options:
>>
>> $ x86_64-softmmu/qemu-system-x86_64 -object can-bus,help
>> There are no options for can-bus.
>>
>> (Before this series, there just is no output.)
>>
>>
>> As a side effect, patch 1 fixes iotest 082.
> 
> Thanks, applied to the block branch.

Thank you both for the quick pong. :-)

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-11-06  0:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-19 16:49 [Qemu-devel] [PATCH v2 0/5] Various option help readability improvement suggestions Max Reitz
2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 1/5] option: Make option help nicer to read Max Reitz
2018-11-05  8:14   ` Marc-André Lureau
2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 2/5] chardev: Indent list of chardevs Max Reitz
2018-11-05  8:14   ` Marc-André Lureau
2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 3/5] qdev-monitor: Make device options help nicer Max Reitz
2018-11-05  8:14   ` Marc-André Lureau
2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 4/5] object: Make option help nicer to read Max Reitz
2018-11-05  8:15   ` Marc-André Lureau
2018-10-19 16:49 ` [Qemu-devel] [PATCH v2 5/5] fw_cfg: Drop newline in @file description Max Reitz
2018-11-05  8:15   ` Marc-André Lureau
2018-11-05  0:25 ` [Qemu-devel] [PATCH v2 0/5] Various option help readability improvement suggestions Max Reitz
2018-11-05 14:18 ` Kevin Wolf
2018-11-06  0:35   ` Max Reitz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.