From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHex9-0003EW-Ei for qemu-devel@nongnu.org; Mon, 07 Dec 2009 09:52:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHex3-000393-Us for qemu-devel@nongnu.org; Mon, 07 Dec 2009 09:52:42 -0500 Received: from [199.232.76.173] (port=34713 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHex3-00038F-D8 for qemu-devel@nongnu.org; Mon, 07 Dec 2009 09:52:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57775) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHex3-0005b8-1L for qemu-devel@nongnu.org; Mon, 07 Dec 2009 09:52:37 -0500 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nB7EqZAb015270 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 7 Dec 2009 09:52:35 -0500 From: Gerd Hoffmann Date: Mon, 7 Dec 2009 15:52:28 +0100 Message-Id: <1260197548-27600-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH] also match bus name for global properties List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann 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 --- 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