mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
a5296ca9df
commit
a10f07a7d0
4 changed files with 41 additions and 1 deletions
20
hw/container.c
Normal file
20
hw/container.c
Normal file
|
@ -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);
|
Loading…
Add table
Add a link
Reference in a new issue