mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
qemu: Change signature for virQEMUCapsSupportsI8042Toggle()
We will soon need to use it in a context where we don't have a virDomainDef handy. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
d292c5ba17
commit
e0e496d90c
@ -6032,15 +6032,16 @@ virQEMUCapsSupportsI8042(virQEMUCaps *qemuCaps,
|
||||
|
||||
bool
|
||||
virQEMUCapsSupportsI8042Toggle(virQEMUCaps *qemuCaps,
|
||||
const virDomainDef *def)
|
||||
const char *machine,
|
||||
const virArch arch)
|
||||
{
|
||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_I8042_OPT))
|
||||
return false;
|
||||
|
||||
return qemuDomainIsI440FX(def) ||
|
||||
qemuDomainIsQ35(def) ||
|
||||
qemuDomainIsXenFV(def) ||
|
||||
STREQ(def->os.machine, "isapc");
|
||||
return qemuDomainMachineIsI440FX(machine, arch) ||
|
||||
qemuDomainMachineIsQ35(machine, arch) ||
|
||||
qemuDomainMachineIsXenFV(machine, arch) ||
|
||||
STREQ(machine, "isapc");
|
||||
}
|
||||
|
||||
|
||||
|
@ -723,7 +723,8 @@ bool virQEMUCapsSupportsI8042(virQEMUCaps *qemuCaps,
|
||||
const virDomainDef *def);
|
||||
|
||||
bool virQEMUCapsSupportsI8042Toggle(virQEMUCaps *qemuCaps,
|
||||
const virDomainDef *def);
|
||||
const char *machine,
|
||||
const virArch arch);
|
||||
|
||||
const char *virQEMUCapsGetBinary(virQEMUCaps *qemuCaps);
|
||||
virArch virQEMUCapsGetArch(virQEMUCaps *qemuCaps);
|
||||
|
@ -258,7 +258,7 @@ qemuValidateDomainDefFeatures(const virDomainDef *def,
|
||||
}
|
||||
|
||||
if (def->features[i] != VIR_TRISTATE_SWITCH_ABSENT &&
|
||||
!virQEMUCapsSupportsI8042Toggle(qemuCaps, def)) {
|
||||
!virQEMUCapsSupportsI8042Toggle(qemuCaps, def->os.machine, def->os.arch)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("ps2 feature state cannot be controlled with this QEMU binary"));
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user