From dfe47e7029e117f65a14c0948021654f7f7d5d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Thu, 5 Apr 2012 13:21:46 +0200 Subject: qom: Refine container_get() to allow using a custom root MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Specify the root to search from as argument. This avoids hardcoding "/machine" in some places and makes it more flexible. Signed-off-by: Andreas Färber Cc: Paolo Bonzini Cc: Anthony Liguori Signed-off-by: Anthony Liguori --- hw/qdev-monitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/qdev-monitor.c') diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index 81d654827f..dc4e4e1b84 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -181,7 +181,7 @@ static Object *qdev_get_peripheral(void) static Object *dev; if (dev == NULL) { - dev = container_get("/machine/peripheral"); + dev = container_get(qdev_get_machine(), "/peripheral"); } return dev; @@ -192,7 +192,7 @@ static Object *qdev_get_peripheral_anon(void) static Object *dev; if (dev == NULL) { - dev = container_get("/machine/peripheral-anon"); + dev = container_get(qdev_get_machine(), "/peripheral-anon"); } return dev; -- cgit v1.2.3