[RFC PATCH v2 118/137] sysbus: Parent main-system-bus directly under /machine

Alexander Graf <[email protected]>
Newsgroups org.nongnu.qemu-arm,org.nongnu.qemu-devel,org.nongnu.qemu-riscv
Message-ID <[email protected]>
The main system bus is the only object deliberately placed under
/machine/unattached; every other resident is an accidental orphan.
Promoting it to /machine/sysbus makes /machine/unattached a pure
bug indicator that later commits can turn into a hard error.

The canonical path changes from /machine/unattached/sysbus to
/machine/sysbus.  qom-list users that hard-code the old path need
to be updated; the hmp/qmp qom-tree output naturally follows.

AI-used-for: code (refactoring)
Signed-off-by: Alexander Graf <[email protected]>
---
 system/vl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/system/vl.c b/system/vl.c
index 061cbdf860..b4434839df 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -2211,7 +2211,7 @@ static void qemu_create_machine(QDict *qdict)
     object_property_add_child(object_get_root(), "machine",
                               OBJECT(current_machine));
     qemu_create_machine_containers(OBJECT(current_machine));
-    object_property_add_child(machine_get_container("unattached"),
+    object_property_add_child(OBJECT(current_machine),
                               "sysbus", OBJECT(sysbus_get_default()));
 
     if (machine_class->minimum_page_bits) {
-- 
2.47.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.