mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-27 15:05:17 +00:00
qemuDomainNeedsFDC: Simplify and improve checking if a machine needs FDC
Commit c7f3a1f7870 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
|
bool
|
||||||
qemuDomainIsQ35(const virDomainDef *def)
|
qemuDomainIsQ35(const virDomainDef *def)
|
||||||
{
|
{
|
||||||
@ -8781,7 +8767,8 @@ qemuDomainHasBuiltinIDE(const virDomainDef *def)
|
|||||||
bool
|
bool
|
||||||
qemuDomainNeedsFDC(const virDomainDef *def)
|
qemuDomainNeedsFDC(const virDomainDef *def)
|
||||||
{
|
{
|
||||||
return qemuDomainMachineNeedsFDC(def->os.machine, def->os.arch);
|
/* all supported Q35 machines need explicit FDC */
|
||||||
|
return qemuDomainIsQ35(def);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user