diff mbox series

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

Message ID 20181015172817.19796-4-mreitz@redhat.com (mailing list archive)
State New, archived
Headers show
Series Various option help readability improvement suggestions | expand

Commit Message

Max Reitz Oct. 15, 2018, 5:28 p.m. UTC
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 ': '.

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 qdev-monitor.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/qdev-monitor.c b/qdev-monitor.c
index 802c18a74e..481bb4bbf9 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -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 {