[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/3] hw/null-machine: Convert null machine to QOM
From: |
Marcel Apfelbaum |
Subject: |
[Qemu-devel] [PATCH 2/3] hw/null-machine: Convert null machine to QOM |
Date: |
Tue, 11 Mar 2014 17:35:55 +0200 |
Needed by some tests.
Signed-off-by: Marcel Apfelbaum <address@hidden>
---
hw/core/null-machine.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/hw/core/null-machine.c b/hw/core/null-machine.c
index d813c08..5ec02cf 100644
--- a/hw/core/null-machine.c
+++ b/hw/core/null-machine.c
@@ -26,10 +26,15 @@ static QEMUMachine machine_none = {
.max_cpus = 0,
};
-static void register_machines(void)
+static const TypeInfo none_machine_type_info = {
+ .name = "none-machine",
+ .parent = TYPE_MACHINE,
+ .class_data = (void *)&machine_none
+};
+
+static void none_machine_register_type(void)
{
- qemu_register_machine(&machine_none);
+ type_register_static(&none_machine_type_info);
}
-machine_init(register_machines);
-
+type_init(none_machine_register_type)
--
1.8.3.1