qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 20/22] info qdm: do not require a parent_bus to be s


From: Anthony Liguori
Subject: [Qemu-devel] [PATCH 20/22] info qdm: do not require a parent_bus to be set
Date: Wed, 1 Feb 2012 13:51:01 -0600

Signed-off-by: Anthony Liguori <address@hidden>
---
 hw/qdev-monitor.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

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;
 }
-- 
1.7.4.1




reply via email to

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