From d03d6b4e5cc33d5c9e035e68aa30da1a32780f7d Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Fri, 23 Dec 2011 08:16:58 -0600 Subject: info qdm: do not require a parent_bus to be set Signed-off-by: Anthony Liguori --- hw/qdev-monitor.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'hw') diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index a6f0e16..56a3458 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -163,12 +163,14 @@ int qdev_device_help(QemuOpts *opts) error_printf("%s.%s=%s\n", driver, prop->name, prop->info->legacy_name ?: prop->info->name); } - for (prop = info->bus_info->props; prop && prop->name; prop++) { - if (!prop->info->parse) { - continue; /* no way to set it, don't show */ + if (info->bus_info) { + for (prop = info->bus_info->props; prop && prop->name; prop++) { + if (!prop->info->parse) { + continue; /* no way to set it, don't show */ + } + error_printf("%s.%s=%s\n", driver, prop->name, + prop->info->legacy_name ?: prop->info->name); } - error_printf("%s.%s=%s\n", driver, prop->name, - prop->info->legacy_name ?: prop->info->name); } return 1; } -- cgit v1.1