qemu-block
[Top][All Lists]
Advanced

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

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


From: Max Reitz
Subject: [Qemu-block] [PATCH 3/5] qdev-monitor: Make device options help nicer
Date: Mon, 15 Oct 2018 19:28:15 +0200

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 <address@hidden>
---
 qdev-monitor.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

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 {
-- 
2.17.1




reply via email to

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