From patchwork Tue Mar 27 16:38:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 149001 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 30BA2B6EE6 for ; Wed, 28 Mar 2012 04:12:19 +1100 (EST) Received: from localhost ([::1]:46836 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCZR9-00018r-Nm for incoming@patchwork.ozlabs.org; Tue, 27 Mar 2012 12:39:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCZQe-0008VS-9o for qemu-devel@nongnu.org; Tue, 27 Mar 2012 12:39:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCZQX-00030w-Uo for qemu-devel@nongnu.org; Tue, 27 Mar 2012 12:39:27 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:63569) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCZQX-00030c-NG for qemu-devel@nongnu.org; Tue, 27 Mar 2012 12:39:21 -0400 Received: by ggnp2 with SMTP id p2so123455ggn.4 for ; Tue, 27 Mar 2012 09:39:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=qkB1v7UxwbzgdA5tZRxepMAdiIOGzhSwdYiVvSQbHvw=; b=pbVsjZjZu9m5WSkFEjuvQ2d6X8U72CnfsROXScovp4moQgAu+MNF0JQY1AQw1JV+FU pa/XinRxny74n+CjChUsMoMEj5TaRKlWGgBDiG82cFXX/uFmUSB85+wfwk12DFSdsKe6 y+bV/KZVDteeq7ByxVmcvHU7YtlzYUuP/M4euoVDdZH4UOVW5r+3Kp5kpKSgucN05p4K zAiAk+vCx62yQdavX7vFkXsNEki/IOkD2mjh+5ZIClXJt65VDqvUPDcv6ndX32/006IP DowLg8s9lQ6sN7pCqRw3KR3e45CASaX9DUsy5O51FpBzwdhJbLUPaF6fkS30mU5joE9s fECQ== Received: by 10.68.125.168 with SMTP id mr8mr63981065pbb.21.1332866359756; Tue, 27 Mar 2012 09:39:19 -0700 (PDT) Received: from yakj.usersys.redhat.com (93-34-182-16.ip50.fastwebnet.it. [93.34.182.16]) by mx.google.com with ESMTPS id 3sm690921pbf.47.2012.03.27.09.39.16 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 27 Mar 2012 09:39:18 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 27 Mar 2012 18:38:48 +0200 Message-Id: <1332866328-25443-5-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: <1332866328-25443-1-git-send-email-pbonzini@redhat.com> References: <1332866328-25443-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.161.173 Cc: aliguori@linux.vnet.ibm.com, andreas.faerber@web.de Subject: [Qemu-devel] [PATCH 4/4] qdev: put all devices under /machine 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 Avoid cluttering too much the QOM root. Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori --- hw/piix_pci.c | 2 +- hw/ppc_prep.c | 2 +- hw/qdev-monitor.c | 4 ++-- hw/qdev.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/piix_pci.c b/hw/piix_pci.c index 9017565..bd20a16 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -276,7 +276,7 @@ static PCIBus *i440fx_common_init(const char *device_name, b = pci_bus_new(&s->busdev.qdev, NULL, pci_address_space, address_space_io, 0); s->bus = b; - object_property_add_child(object_get_root(), "i440fx", OBJECT(dev), NULL); + object_property_add_child(container_get("/machine"), "i440fx", OBJECT(dev), NULL); qdev_init_nofail(dev); d = pci_create_simple(b, 0, device_name); diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c index 86c9336..d06fc5e 100644 --- a/hw/ppc_prep.c +++ b/hw/ppc_prep.c @@ -615,7 +615,7 @@ static void ppc_prep_init (ram_addr_t ram_size, sys = sysbus_from_qdev(dev); pcihost = DO_UPCAST(PCIHostState, busdev, sys); pcihost->address_space = get_system_memory(); - object_property_add_child(object_get_root(), "raven", OBJECT(dev), NULL); + object_property_add_child(container_get("/machine", "raven", OBJECT(dev), NULL); qdev_init_nofail(dev); pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci.0"); if (pci_bus == NULL) { diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index 031cb83..4783366 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -180,7 +180,7 @@ static Object *qdev_get_peripheral(void) static Object *dev; if (dev == NULL) { - dev = container_get("/peripheral"); + dev = container_get("/machine/peripheral"); } return dev; @@ -191,7 +191,7 @@ static Object *qdev_get_peripheral_anon(void) static Object *dev; if (dev == NULL) { - dev = container_get("/peripheral-anon"); + dev = container_get("/machine/peripheral-anon"); } return dev; diff --git a/hw/qdev.c b/hw/qdev.c index f5c716e..60e5081 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -157,7 +157,7 @@ int qdev_init(DeviceState *dev) static int unattached_count = 0; gchar *name = g_strdup_printf("device[%d]", unattached_count++); - object_property_add_child(container_get("/unattached"), name, + object_property_add_child(container_get("/machine/unattached"), name, OBJECT(dev), NULL); g_free(name); }