mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
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>
This commit is contained in:
parent
f92f8afebe
commit
f80f9ec9a6
45 changed files with 321 additions and 263 deletions
12
hw/pc.c
12
hw/pc.c
|
@ -1184,16 +1184,24 @@ void cmos_set_s3_resume(void)
|
|||
rtc_set_memory(rtc_state, 0xF, 0xFE);
|
||||
}
|
||||
|
||||
QEMUMachine pc_machine = {
|
||||
static QEMUMachine pc_machine = {
|
||||
.name = "pc",
|
||||
.desc = "Standard PC",
|
||||
.init = pc_init_pci,
|
||||
.max_cpus = 255,
|
||||
};
|
||||
|
||||
QEMUMachine isapc_machine = {
|
||||
static QEMUMachine isapc_machine = {
|
||||
.name = "isapc",
|
||||
.desc = "ISA-only PC",
|
||||
.init = pc_init_isa,
|
||||
.max_cpus = 1,
|
||||
};
|
||||
|
||||
static void pc_machine_init(void)
|
||||
{
|
||||
qemu_register_machine(&pc_machine);
|
||||
qemu_register_machine(&isapc_machine);
|
||||
}
|
||||
|
||||
machine_init(pc_machine_init);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue