mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
compat: replace PC_COMPAT_2_2 & HW_COMPAT_2_2 macros
Use static arrays instead. I decided to rename the conflicting pc_compat_2_2() function with pc_compat_2_2_fn(). Suggested-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Acked-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
8995dd9009
commit
1c30044e1a
7 changed files with 110 additions and 105 deletions
|
@ -318,14 +318,14 @@ static void pc_compat_2_3_fn(MachineState *machine)
|
|||
}
|
||||
}
|
||||
|
||||
static void pc_compat_2_2(MachineState *machine)
|
||||
static void pc_compat_2_2_fn(MachineState *machine)
|
||||
{
|
||||
pc_compat_2_3_fn(machine);
|
||||
}
|
||||
|
||||
static void pc_compat_2_1(MachineState *machine)
|
||||
{
|
||||
pc_compat_2_2(machine);
|
||||
pc_compat_2_2_fn(machine);
|
||||
x86_cpu_change_kvm_default("svm", NULL);
|
||||
}
|
||||
|
||||
|
@ -578,18 +578,16 @@ DEFINE_I440FX_MACHINE(v2_3, "pc-i440fx-2.3", pc_compat_2_3_fn,
|
|||
static void pc_i440fx_2_2_machine_options(MachineClass *m)
|
||||
{
|
||||
PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
||||
static GlobalProperty compat[] = {
|
||||
PC_COMPAT_2_2
|
||||
};
|
||||
|
||||
pc_i440fx_2_3_machine_options(m);
|
||||
m->hw_version = "2.2.0";
|
||||
m->default_machine_opts = "firmware=bios-256k.bin,suppress-vmdesc=on";
|
||||
compat_props_add(m->compat_props, compat, G_N_ELEMENTS(compat));
|
||||
compat_props_add(m->compat_props, hw_compat_2_2, hw_compat_2_2_len);
|
||||
compat_props_add(m->compat_props, pc_compat_2_2, pc_compat_2_2_len);
|
||||
pcmc->rsdp_in_ram = false;
|
||||
}
|
||||
|
||||
DEFINE_I440FX_MACHINE(v2_2, "pc-i440fx-2.2", pc_compat_2_2,
|
||||
DEFINE_I440FX_MACHINE(v2_2, "pc-i440fx-2.2", pc_compat_2_2_fn,
|
||||
pc_i440fx_2_2_machine_options);
|
||||
|
||||
static void pc_i440fx_2_1_machine_options(MachineClass *m)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue