diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-12-12 14:29:28 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-12-15 09:20:47 -0600 |
commit | a10f07a7d0827eeef920c16b500b50030b7ff651 (patch) | |
tree | a44dcb4da7c63ea80b9866b7f1b87aa86263d34d /hw/container.c | |
parent | a5296ca9df745d8af319282ab5d85439c211bb10 (diff) | |
download | qemu-a10f07a7d0827eeef920c16b500b50030b7ff651.zip qemu-a10f07a7d0827eeef920c16b500b50030b7ff651.tar.gz qemu-a10f07a7d0827eeef920c16b500b50030b7ff651.tar.bz2 |
qom: introduce root device
This is based on Jan's suggestion for how to do unique naming. The root device
is the root of composition. All devices are reachable via child<> links from
this device.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/container.c')
-rw-r--r-- | hw/container.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/hw/container.c b/hw/container.c new file mode 100644 index 0000000..9cbf399 --- /dev/null +++ b/hw/container.c @@ -0,0 +1,20 @@ +#include "sysbus.h" + +static int container_initfn(SysBusDevice *dev) +{ + return 0; +} + +static SysBusDeviceInfo container_info = { + .init = container_initfn, + .qdev.name = "container", + .qdev.size = sizeof(SysBusDevice), + .qdev.no_user = 1, +}; + +static void container_init(void) +{ + sysbus_register_withprop(&container_info); +} + +device_init(container_init); |