summary refs log tree commit diff stats
path: root/hw/ppc/mac_oldworld.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2015-09-04 15:37:08 -0300
committerAndreas Färber <afaerber@suse.de>2015-09-19 16:40:15 +0200
commite264d29de28c5b0be3d063307ce9fb613b427cc3 (patch)
tree5e8d9622965ee60421eddbb26dcb42ab8bea7712 /hw/ppc/mac_oldworld.c
parentf309ae852c67833c3cac11747474fbb013529382 (diff)
downloadfocaccia-qemu-e264d29de28c5b0be3d063307ce9fb613b427cc3.tar.gz
focaccia-qemu-e264d29de28c5b0be3d063307ce9fb613b427cc3.zip
Use DEFINE_MACHINE() to register all machines
Convert all machines to use DEFINE_MACHINE() instead of QEMUMachine
automatically using a script.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
[AF: Style cleanups, convert imx25_pdk machine]
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/ppc/mac_oldworld.c')
-rw-r--r--hw/ppc/mac_oldworld.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index 4c5fe4640c..5cba2cb145 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -357,22 +357,17 @@ static int heathrow_kvm_type(const char *arg)
     return 2;
 }
 
-static QEMUMachine heathrow_machine = {
-    .name = "g3beige",
-    .desc = "Heathrow based PowerMAC",
-    .init = ppc_heathrow_init,
-    .max_cpus = MAX_CPUS,
+static void heathrow_machine_init(MachineClass *mc)
+{
+    mc->desc = "Heathrow based PowerMAC";
+    mc->init = ppc_heathrow_init;
+    mc->max_cpus = MAX_CPUS;
 #ifndef TARGET_PPC64
-    .is_default = 1,
+    mc->is_default = 1;
 #endif
     /* TOFIX "cad" when Mac floppy is implemented */
-    .default_boot_order = "cd",
-    .kvm_type = heathrow_kvm_type,
-};
-
-static void heathrow_machine_init(void)
-{
-    qemu_register_machine(&heathrow_machine);
+    mc->default_boot_order = "cd";
+    mc->kvm_type = heathrow_kvm_type;
 }
 
-machine_init(heathrow_machine_init);
+DEFINE_MACHINE("g3beige", heathrow_machine_init)