From a10f07a7d0827eeef920c16b500b50030b7ff651 Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Mon, 12 Dec 2011 14:29:28 -0600 Subject: 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 --- hw/container.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 hw/container.c (limited to 'hw/container.c') diff --git a/hw/container.c b/hw/container.c new file mode 100644 index 0000000000..9cbf3992c4 --- /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); -- cgit v1.2.3-55-g7522