diff mbox

[FOR,0.12,v4,03/22] qdev: also match bus name for global properties

Message ID 1260274314-2906-4-git-send-email-kraxel@redhat.com
State New
Headers show

Commit Message

Gerd Hoffmann Dec. 8, 2009, 12:11 p.m. UTC
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>
---
 hw/qdev-properties.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

Michael S. Tsirkin Dec. 9, 2009, 4:14 p.m. UTC | #1
On Tue, Dec 08, 2009 at 01:11:35PM +0100, Gerd Hoffmann wrote:
> 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>

Looks like an earlier version of the patches was applied
on staging, and so staging lacks this patch.


> ---
>  hw/qdev-properties.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> 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 @@ 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) {
> -- 
> 1.6.5.2
> 
>
diff mbox

Patch

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 @@  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) {