Skip to contentSkip to conversation

also match bus name for global properties

PATCH New Gerd Hoffmann 1 participant 1 message Dec 7, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 hw/qdev-properties.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
hw/qdev-properties.c +2 -1
index fe106bd..fb07279 100644
@@ -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) {
Signature · 1 line
1.6.5.2