From patchwork Wed Apr 18 20:56:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony Liguori X-Patchwork-Id: 153590 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DEA86B6EE7 for ; Thu, 19 Apr 2012 06:57:57 +1000 (EST) Received: from localhost ([::1]:51623 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKbwp-0007UA-Qw for incoming@patchwork.ozlabs.org; Wed, 18 Apr 2012 16:57:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKbwN-0006aF-V5 for qemu-devel@nongnu.org; Wed, 18 Apr 2012 16:57:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SKbwM-0006vi-0v for qemu-devel@nongnu.org; Wed, 18 Apr 2012 16:57:27 -0400 Received: from cpe-70-123-132-139.austin.res.rr.com ([70.123.132.139]:59673 helo=localhost6.localdomain6) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKbwL-0006vc-Pa for qemu-devel@nongnu.org; Wed, 18 Apr 2012 16:57:25 -0400 Received: from localhost6.localdomain6 (localhost.localdomain [127.0.0.1]) by localhost6.localdomain6 (8.14.4/8.14.4/Debian-2ubuntu2) with ESMTP id q3IKvJYL019399; Wed, 18 Apr 2012 15:57:19 -0500 Received: (from anthony@localhost) by localhost6.localdomain6 (8.14.4/8.14.4/Submit) id q3IKvHMi019397; Wed, 18 Apr 2012 15:57:17 -0500 From: Anthony Liguori To: qemu-devel@nongnu.org Date: Wed, 18 Apr 2012 15:56:43 -0500 Message-Id: <1334782613-5421-5-git-send-email-aliguori@us.ibm.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1334782613-5421-1-git-send-email-aliguori@us.ibm.com> References: <1334782613-5421-1-git-send-email-aliguori@us.ibm.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 70.123.132.139 Cc: Wanpeng Li , Paolo Bonzini , Anthony Liguori , Andreas Faerber , Peter Maydell Subject: [Qemu-devel] [PATCH 04/14] qdev: don't allow globals to be set by bus name X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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) {