]> git.proxmox.com Git - qemu.git/commitdiff
qdev: also match bus name for global properties
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 8 Dec 2009 12:11:35 +0000 (13:11 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Sat, 12 Dec 2009 13:59:41 +0000 (07:59 -0600)
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>
hw/qdev-properties.c

index fe106bd6a6625906bdce12a602ec2af67a1d5765..fb07279ba1ebdadee42d3e03065593907d5ed908 100644 (file)
@@ -614,7 +614,8 @@ void qdev_prop_set_globals(DeviceState *dev)
     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) {