diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-12-23 09:08:05 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-02-03 10:41:08 -0600 |
commit | 8b45d447ce5cce07cbdf0f42b969137430284d5c (patch) | |
tree | 8732080bdc35de9f5399db2244e7904ffaf647b5 /hw/qdev-monitor.c | |
parent | db85b575b9f29487d1dd854da730a9293d91198a (diff) | |
download | qemu-8b45d447ce5cce07cbdf0f42b969137430284d5c.zip qemu-8b45d447ce5cce07cbdf0f42b969137430284d5c.tar.gz qemu-8b45d447ce5cce07cbdf0f42b969137430284d5c.tar.bz2 |
container: make a decendent of Object
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
v1 -> v2
- Add license (Paolo)
Diffstat (limited to 'hw/qdev-monitor.c')
-rw-r--r-- | hw/qdev-monitor.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index 56a3458..135c2bf 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -177,30 +177,28 @@ int qdev_device_help(QemuOpts *opts) static Object *qdev_get_peripheral(void) { - static DeviceState *dev; + static Object *dev; if (dev == NULL) { - dev = qdev_create(NULL, "container"); + dev = object_new("container"); object_property_add_child(object_get_root(), "peripheral", OBJECT(dev), NULL); - qdev_init_nofail(dev); } - return OBJECT(dev); + return dev; } static Object *qdev_get_peripheral_anon(void) { - static DeviceState *dev; + static Object *dev; if (dev == NULL) { - dev = qdev_create(NULL, "container"); + dev = object_new("container"); object_property_add_child(object_get_root(), "peripheral-anon", OBJECT(dev), NULL); - qdev_init_nofail(dev); } - return OBJECT(dev); + return dev; } static void qbus_list_bus(DeviceState *dev) |