From patchwork Tue Dec 8 12:11:35 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 40609 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7CD5EB6F10 for ; Tue, 8 Dec 2009 23:17:51 +1100 (EST) Received: from localhost ([127.0.0.1]:57855 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHz0m-0007Ba-C1 for incoming@patchwork.ozlabs.org; Tue, 08 Dec 2009 07:17:48 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHyvH-0005dp-28 for qemu-devel@nongnu.org; Tue, 08 Dec 2009 07:12:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHyvC-0005cG-Cn for qemu-devel@nongnu.org; Tue, 08 Dec 2009 07:12:06 -0500 Received: from [199.232.76.173] (port=44190 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHyvC-0005cD-5k for qemu-devel@nongnu.org; Tue, 08 Dec 2009 07:12:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44932) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHyvB-00081u-Qj for qemu-devel@nongnu.org; Tue, 08 Dec 2009 07:12:02 -0500 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nB8CC1a9014492 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 8 Dec 2009 07:12:01 -0500 Received: from zweiblum.home.kraxel.org (vpn2-9-91.ams2.redhat.com [10.36.9.91]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nB8CBxej005085; Tue, 8 Dec 2009 07:11:59 -0500 Received: by zweiblum.home.kraxel.org (Postfix, from userid 500) id 7E22C700B9; Tue, 8 Dec 2009 13:11:57 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 8 Dec 2009 13:11:35 +0100 Message-Id: <1260274314-2906-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1260274314-2906-1-git-send-email-kraxel@redhat.com> References: <1260274314-2906-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Gerd Hoffmann , agraf@suse.de, lcapitulino@redhat.com Subject: [Qemu-devel] [FOR 0.12 PATCH v4 03/22] qdev: also match bus name for global properties X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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) {