mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
qemuDomainNeedsFDC: Simplify and improve checking if a machine needs FDC
Commit c7f3a1f787
turned qemuDomainMachineNeedsFDC() effectively into
qemuDomainIsQ35. Use it instead as it also matches the non-canonicalized
'q35'.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
dc5fd559eb
commit
2168b584a8
@ -8685,20 +8685,6 @@ bool qemuDomainHasBuiltinESP(const virDomainDef *def)
|
||||
}
|
||||
|
||||
|
||||
static bool
|
||||
qemuDomainMachineNeedsFDC(const char *machine,
|
||||
const virArch arch)
|
||||
{
|
||||
if (!ARCH_IS_X86(arch))
|
||||
return false;
|
||||
|
||||
if (!STRPREFIX(machine, "pc-q35-"))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
qemuDomainIsQ35(const virDomainDef *def)
|
||||
{
|
||||
@ -8781,7 +8767,8 @@ qemuDomainHasBuiltinIDE(const virDomainDef *def)
|
||||
bool
|
||||
qemuDomainNeedsFDC(const virDomainDef *def)
|
||||
{
|
||||
return qemuDomainMachineNeedsFDC(def->os.machine, def->os.arch);
|
||||
/* all supported Q35 machines need explicit FDC */
|
||||
return qemuDomainIsQ35(def);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user