Received: from eggs.gnu.org ([208.118.235.92]:48116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPHzC-0007fG-Mx for qemu-devel@nongnu.org; Tue, 01 May 2012 14:39:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SPHzB-0001yL-4B for qemu-devel@nongnu.org; Tue, 01 May 2012 14:39:42 -0400 Received: from [159.125.79.200] (port=22234 helo=localhost6.localdomain6) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPHz9-0001xt-N1 for qemu-devel@nongnu.org; Tue, 01 May 2012 14:39:41 -0400 From: Anthony Liguori Date: Tue, 1 May 2012 13:18:04 -0500 Message-Id: <1335896294-9530-5-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1335896294-9530-1-git-send-email-aliguori@us.ibm.com> References: <1335896294-9530-1-git-send-email-aliguori@us.ibm.com> Subject: [Qemu-devel] [PATCH 04/14] qdev: don't allow globals to be set by bus name List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Paolo Bonzini , Anthony Liguori , Andreas Faerber , Wanpeng Li This is technically a compatibility breaker. However: 1) libvirt does not rely on this (it always uses the driver name) 2) This behavior isn't actually documented anywhere (the docs just say driver). 3) I suspect there are less than three people on earth that even know this is possible (minus the people reading this message). So I think we can safely break it :-) Signed-off-by: Anthony Liguori --- hw/qdev-properties.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index 98dd06a..894fa79 100644 --- a/hw/qdev-properties.c +++ b/hw/qdev-properties.c @@ -1172,8 +1172,7 @@ void qdev_prop_set_globals(DeviceState *dev) GlobalProperty *prop; QTAILQ_FOREACH(prop, &global_props, next) { - if (strcmp(object_get_typename(OBJECT(dev)), prop->driver) != 0 && - strcmp(qdev_get_bus_info(dev)->name, prop->driver) != 0) { + if (strcmp(object_get_typename(OBJECT(dev)), prop->driver) != 0) { continue; } if (qdev_prop_parse(dev, prop->property, prop->value) != 0) { -- 1.7.5.4