qdev: also match bus name for global properties
i.e. -global PCI.<property>=<value> will set a default property for all
PCI devices. Also works for the compat properties used by machine
types.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c
index fe106bd..fb07279 100644
--- a/hw/qdev-properties.c
+++ b/hw/qdev-properties.c
@@ -614,7 +614,8 @@
GlobalProperty *prop;
QTAILQ_FOREACH(prop, &global_props, next) {
- if (strcmp(dev->info->name, prop->driver) != 0) {
+ if (strcmp(dev->info->name, prop->driver) != 0 &&
+ strcmp(dev->info->bus_info->name, prop->driver) != 0) {
continue;
}
if (qdev_prop_parse(dev, prop->property, prop->value) != 0) {