Received: from eggs.gnu.org ([2001:4830:134:3::10]:48106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gC6fi-0005Vz-0J for qemu-devel@nongnu.org; Mon, 15 Oct 2018 13:28:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gC6fh-0005EF-6H for qemu-devel@nongnu.org; Mon, 15 Oct 2018 13:28:49 -0400 From: Max Reitz Date: Mon, 15 Oct 2018 19:28:15 +0200 Message-Id: <20181015172817.19796-4-mreitz@redhat.com> In-Reply-To: <20181015172817.19796-1-mreitz@redhat.com> References: <20181015172817.19796-1-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH 3/5] qdev-monitor: Make device options help nicer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, Max Reitz , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Markus Armbruster , Paolo Bonzini 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 --- 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