Use machine_get_container() whenever applicable across the tree.
Signed-off-by: Peter Xu <peterx@redhat.com>
---
hw/core/gpio.c | 3 +--
hw/core/qdev.c | 3 +--
hw/core/sysbus.c | 4 ++--
hw/i386/pc.c | 4 ++--
system/ioport.c | 2 +-
system/memory.c | 2 +-
system/qdev-monitor.c | 6 +++---
system/vl.c | 3 +--
8 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 317aaca25a..b8ec2506e1 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -460,7 +460,7 @@ static int check_fdc(Object *obj, void *opaque)
}
static const char * const fdc_container_path[] = {
- "/unattached", "/peripheral", "/peripheral-anon"
+ "unattached", "peripheral", "peripheral-anon"
};
/*
@@ -474,7 +474,7 @@ static ISADevice *pc_find_fdc0(void)
CheckFdcState state = { 0 };
for (i = 0; i < ARRAY_SIZE(fdc_container_path); i++) {
- container = container_get(qdev_get_machine(), fdc_container_path[i]);
+ container = machine_get_container(fdc_container_path[i]);
object_child_foreach(container, check_fdc, &state);