From: Gerd Hoffmann Date: Tue, 8 Dec 2009 12:11:35 +0000 (+0100) Subject: qdev: also match bus name for global properties X-Git-Tag: v0.12.0-rc2~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7058b807cd43b639d9ac1058959dc83f5ce54f4f;p=thirdparty%2Fqemu.git qdev: also match bus name for global properties i.e. -global PCI.= will set a default property for all PCI devices. Also works for the compat properties used by machine types. Signed-off-by: Gerd Hoffmann Signed-off-by: Anthony Liguori (cherry picked from commit 07a8de3566bd576dc33e55af830d63dcc2287617) --- diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index fe106bd6a66..fb07279ba1e 100644 --- a/hw/qdev-properties.c +++ b/hw/qdev-properties.c @@ -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) {