diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2009-05-20 18:38:09 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-05-21 08:47:55 -0500 |
commit | f80f9ec9a63bb2200d614feb658a77b78f9a4bba (patch) | |
tree | 59e22e0a617e392a65431b82256fb443aa6ad850 /hw/sun4u.c | |
parent | f92f8afebe038a4eae9ad90a140c9529f94919a6 (diff) | |
download | qemu-f80f9ec9a63bb2200d614feb658a77b78f9a4bba.tar.gz qemu-f80f9ec9a63bb2200d614feb658a77b78f9a4bba.tar.bz2 qemu-f80f9ec9a63bb2200d614feb658a77b78f9a4bba.zip |
Convert machine registration to use module init functions
This cleans up quite a lot of #ifdefs, extern variables, and other ugliness.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/sun4u.c')
-rw-r--r-- | hw/sun4u.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/hw/sun4u.c b/hw/sun4u.c index 1c8b136024..1ff0efa897 100644 --- a/hw/sun4u.c +++ b/hw/sun4u.c @@ -589,23 +589,32 @@ static void niagara_init(ram_addr_t RAM_size, kernel_cmdline, initrd_filename, cpu_model, &hwdefs[2]); } -QEMUMachine sun4u_machine = { +static QEMUMachine sun4u_machine = { .name = "sun4u", .desc = "Sun4u platform", .init = sun4u_init, .max_cpus = 1, // XXX for now }; -QEMUMachine sun4v_machine = { +static QEMUMachine sun4v_machine = { .name = "sun4v", .desc = "Sun4v platform", .init = sun4v_init, .max_cpus = 1, // XXX for now }; -QEMUMachine niagara_machine = { +static QEMUMachine niagara_machine = { .name = "Niagara", .desc = "Sun4v platform, Niagara", .init = niagara_init, .max_cpus = 1, // XXX for now }; + +static void sun4u_machine_init(void) +{ + qemu_register_machine(&sun4u_machine); + qemu_register_machine(&sun4v_machine); + qemu_register_machine(&niagara_machine); +} + +machine_init(sun4u_machine_init); |