Skip to contentSkip to conversation

qdev: print bus properties too

PATCH Applied Gerd Hoffmann 2 participants 2 messages Sep 16, 2011 – Sep 23, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qdev: print bus properties too

Make qdev_device_help print both device and bus properties. Helps libvirt to figure whenever bus properties such as PCI.multifunction are supported present or not.

---
 hw/qdev.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
hw/qdev.c +6 -0
index c463c52..a223d41 100644
@@ -207,6 +207,12 @@ int qdev_device_help(QemuOpts *opts)
         }
         error_printf("%s.%s=%s\n", info->name, prop->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 */
+        }
+        error_printf("%s.%s=%s\n", info->name, prop->name, prop->info->name);
+    }
     return 1;
 }
 
Signature · 1 line
1.7.1
#1 lore raw
Quoted 5 lines · Gerd Hoffmann

Make qdev_device_help print both device and bus properties. Helps libvirt to figure whenever bus properties such as PCI.multifunction are supported present or not.

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 21 lines
---
  hw/qdev.c |    6 ++++++
  1 files changed, 6 insertions(+), 0 deletions(-)
hw/qdev.c +6 -0
index c463c52..a223d41 100644
@@ -207,6 +207,12 @@ int qdev_device_help(QemuOpts *opts)
          }
          error_printf("%s.%s=%s\n", info->name, prop->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 */
+        }
+        error_printf("%s.%s=%s\n", info->name, prop->name, prop->info->name);
+    }
      return 1;
  }