summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2011-09-16 11:25:05 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2011-09-16 09:06:28 -0500
commita8467c7a0e8b024a18608ff7db31ca2f2297e641 (patch)
tree52b2b7fdec8fd6a74fea9265f48ec2b933bc133b /hw
parent71579cae30b53c910cd6c47ab4e683f647d36519 (diff)
downloadqemu-a8467c7a0e8b024a18608ff7db31ca2f2297e641.tar.gz
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. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/qdev.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/qdev.c b/hw/qdev.c
index c463c52150..a223d41cd3 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -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;
}