Skip to contentSkip to conversation

Various option help readability improvement suggestions

PATCH Superseded Max Reitz 5 participants 13 messages Oct 15, 2018 – Oct 19, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Max Reitz

author
#0 lore raw

cover Various option help readability improvement suggestions

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):

Quoted 1 line

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, '=' for types is changed to ': '.

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
[...]

(which is still not perfect, but at least it no longer looks like it's been generated for consumption by libvirt)

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.

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             |   7 +-
 qemu-img.c                 |   4 +-
 util/qemu-option.c         |  31 +-
 vl.c                       |  14 +-
 tests/qemu-iotests/082.out | 956 ++++++++++++++++++-------------------
 7 files changed, 521 insertions(+), 495 deletions(-)
Signature · 1 line
2.17.1
author
#8 lore raw

PATCH 2/5 chardev: Indent list of chardevs

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

---
 chardev/char.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
chardev/char.c +1 -1
index e115166995..10d44aaefc 100644
@@ -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)
Signature · 1 line
2.17.1
author
#9 lore raw

PATCH 3/5 qdev-monitor: Make device options help nicer

In reply to Max Reitz

Just like in qemu_opts_print_help(), print the device name as a caption instead of on every single line, indent all options, and replace the '=' by ': '.

---
 qdev-monitor.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
qdev-monitor.c +6 -1
index 802c18a74e..481bb4bbf9 100644
@@ -285,8 +285,13 @@ 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);
+        out_printf("  %s: %s", prop->value->name, prop->value->type);
         if (prop->value->has_description) {
             out_printf(" (%s)\n", prop->value->description);
         } else {
Signature · 1 line
2.17.1
author
#10 lore raw

PATCH 4/5 object: Make option help nicer to read

In reply to Max Reitz

Just like in qemu_opts_print_help(), print the object name as a caption instead of on every single line, indent all options, and replace the '=' by ': '.

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

---
 vl.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
vl.c +8 -4
index 4e25c78bff..f9ed053eab 100644
@@ -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,16 +2729,20 @@ 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) {
                 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]);
+            printf("  %s\n", (char *)array->pdata[i]);
         }
         g_ptr_array_set_free_func(array, g_free);
         g_ptr_array_free(array, true);
Signature · 1 line
2.17.1
author
#11 lore raw

PATCH 5/5 fw_cfg: Drop newline in @file description

In reply to Max Reitz

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

---
 vl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
vl.c +1 -1
index f9ed053eab..19f8cc67ff 100644
@@ -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",
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 1/5 option: Make option help nicer to read

In reply to Max Reitz

This adds some whitespace into the option help (including indentation) and replaces '=' by ': ' (not least because '=' should be used for values, not types). 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.

---
 include/qemu/option.h      |   2 +-
 qemu-img.c                 |   4 +-
 util/qemu-option.c         |  31 +-
 tests/qemu-iotests/082.out | 956 ++++++++++++++++++-------------------
 4 files changed, 505 insertions(+), 488 deletions(-)
include/qemu/option.h +1 -1
index 3dfb4493cc..844587cab3 100644
@@ -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);
 
qemu-img.c +2 -2
index b12f4cd19b..4c96db7ba4 100644
@@ -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;
 }
util/qemu-option.c +24 -7
index 9a5f263294..ce79332912 100644
@@ -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,10 +241,7 @@ 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) {
             g_string_append_printf(str, " - %s", desc->help);
@@ -247,8 +251,21 @@ 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]);
+        printf("  %s\n", (char *)array->pdata[i]);
     }
     g_ptr_array_set_free_func(array, g_free);
     g_ptr_array_free(array, true);
@@ -930,7 +947,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);
tests/qemu-iotests/082.out +478 -478

1,080 lines not on this page · raw message

Signature · 1 line
2.17.1
Reviewed-by on v1 5/5
#12 lore raw

Re: [Qemu-devel] [PATCH 5/5] fw_cfg: Drop newline in @file description

In reply to Max Reitz
Quoted 4 lines · Max Reitz

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

Quoted 18 lines
---
 vl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
vl.c +1 -1
index f9ed053eab..19f8cc67ff 100644
@@ -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 lore raw

Re: [Qemu-devel] [PATCH 1/5] option: Make option help nicer to read

In reply to Max Reitz

Hi

Quoted 4 lines · Max Reitz

This adds some whitespace into the option help (including indentation) and replaces '=' by ': ' (not least because '=' should be used for values, not types).

Without strong preference, I like the '=' better: it's the expected syntax for the command line argument. (also, --help and man pages describe options with "foo=type", not "foo: type")

Quoted 5 lines

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.

looks good to me otherwise

Quoted 1,200 lines
---
 include/qemu/option.h      |   2 +-
 qemu-img.c                 |   4 +-
 util/qemu-option.c         |  31 +-
 tests/qemu-iotests/082.out | 956 ++++++++++++++++++-------------------
 4 files changed, 505 insertions(+), 488 deletions(-)
include/qemu/option.h +1 -1
index 3dfb4493cc..844587cab3 100644
@@ -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);
 
qemu-img.c +2 -2
index b12f4cd19b..4c96db7ba4 100644
@@ -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;
 }
util/qemu-option.c +24 -7
index 9a5f263294..ce79332912 100644
@@ -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,10 +241,7 @@ 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) {
             g_string_append_printf(str, " - %s", desc->help);
@@ -247,8 +251,21 @@ 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]);
+        printf("  %s\n", (char *)array->pdata[i]);
     }
     g_ptr_array_set_free_func(array, g_free);
     g_ptr_array_free(array, true);
@@ -930,7 +947,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);
tests/qemu-iotests/082.out +478 -479
index 19e9fb13ff..115745f474 100644
@@ -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

Signature · 1 line
Marc-André Lureau
#4 lore raw

Re: [Qemu-devel] [Qemu-block] [PATCH 1/5] option: Make option help nicer to read

In reply to Max Reitz

Am 15.10.2018 um 19:28 hat Max Reitz geschrieben:

Quoted 7 lines

This adds some whitespace into the option help (including indentation) and replaces '=' by ': ' (not least because '=' should be used for values, not types). 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.

If this isn't a bike shedding series, then what is? So...

Quoted 32 lines
tests/qemu-iotests/082.out +8 -18
@@ -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

tests/qemu-iotests/082.out cluster_size: 8192 · line 64

Quoted 10 lines
tests/qemu-iotests/082.out +10 -0
+  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

I like the result of this series better than what we have in current master. Looking at this patch, however, I must also say that I like the original state better than both.

How about aligning the description to the same column again to combine the best of both worlds?

Kevin

#6 lore raw

Re: [Qemu-devel] [PATCH 1/5] option: Make option help nicer to read

In reply to Max Reitz
Quoted 6 lines · Max Reitz

This adds some whitespace into the option help (including indentation) and replaces '=' by ': ' (not least because '=' should be used for values, not types). 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.

Quoted 7 lines
---
 include/qemu/option.h      |   2 +-
 qemu-img.c                 |   4 +-
 util/qemu-option.c         |  31 +-
 tests/qemu-iotests/082.out | 956 ++++++++++++++++++-------------------
 4 files changed, 505 insertions(+), 488 deletions(-)

082 fails for me in master (dddb37495b8). If this patch fixes the failure, its commit message should mention it.

091 and 142 also fail, but look unrelated.

author
#3 lore raw

Re: [Qemu-devel] [PATCH 1/5] option: Make option help nicer to read

In reply to Marc-André Lureau
Quoted 11 lines · Marc-André Lureau

Hi

Quoted 4 lines · Max Reitz

This adds some whitespace into the option help (including indentation) and replaces '=' by ': ' (not least because '=' should be used for values, not types).

Without strong preference, I like the '=' better: it's the expected syntax for the command line argument. (also, --help and man pages describe options with "foo=type", not "foo: type")

Define "strong". I do believe that types are different from values, and that '=' is reserved for values and never used with types.

It's not like I'll die when we keep '=', though, but it's definitely not what I'd use. Maybe "foo=<str>", but that feels overly cluttered when compared to "foo: str". (Especially when it comes to things like "iothread=<link<iothread>>".)

Quoted 7 lines
Quoted 5 lines

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.

looks good to me otherwise

Well, if '=' is the only trouble, that's good. :-)

Max

author
#5 lore raw

Re: [Qemu-devel] [Qemu-block] [PATCH 1/5] option: Make option help nicer to read

In reply to Kevin Wolf
Quoted 10 lines · Kevin Wolf

Am 15.10.2018 um 19:28 hat Max Reitz geschrieben:

Quoted 7 lines

This adds some whitespace into the option help (including indentation) and replaces '=' by ': ' (not least because '=' should be used for values, not types). 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.

If this isn't a bike shedding series, then what is? So...

Sure it is.

Quoted 38 lines
Quoted 38 lines
tests/qemu-iotests/082.out +14 -18
@@ -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
Quoted 8 lines

tests/qemu-iotests/082.out cluster_size: 8192 · line 64

Quoted 4 lines
tests/qemu-iotests/082.out +4 -0
+  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

I like the result of this series better than what we have in current master. Looking at this patch, however, I must also say that I like the original state better than both.

I don't disagree. But having the types is indeed a worthy improvement.

Quoted 2 lines

How about aligning the description to the same column again to combine the best of both worlds?

That sounds good to me.

Max

author
#7 lore raw

Re: [Qemu-devel] [PATCH 1/5] option: Make option help nicer to read

In reply to Markus Armbruster
Quoted 16 lines · Markus Armbruster
Quoted 6 lines · Max Reitz

This adds some whitespace into the option help (including indentation) and replaces '=' by ': ' (not least because '=' should be used for values, not types). 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.

Quoted 7 lines
---
 include/qemu/option.h      |   2 +-
 qemu-img.c                 |   4 +-
 util/qemu-option.c         |  31 +-
 tests/qemu-iotests/082.out | 956 ++++++++++++++++++-------------------
 4 files changed, 505 insertions(+), 488 deletions(-)
Quoted 2 lines

082 fails for me in master (dddb37495b8). If this patch fixes the failure, its commit message should mention it.

Ah, yeah, totally forgot that...

Max

Quoted 1 line

091 and 142 also fail, but look unrelated.