aboutsummaryrefslogtreecommitdiff
path: root/hw/qdev-monitor.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-04-05 13:21:46 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2012-04-24 09:50:31 -0500
commitdfe47e7029e117f65a14c0948021654f7f7d5d05 (patch)
tree9831f047090bf7bb7c58959741aad546221cb862 /hw/qdev-monitor.c
parent7f3bf92fad79dff1edcb796a875b5c0d57666162 (diff)
qom: Refine container_get() to allow using a custom root
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 <afaerber@suse.de> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/qdev-monitor.c')
-rw-r--r--hw/qdev-monitor.c4
1 files changed, 2 insertions, 2 deletions
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;