mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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
|
bool
|
||||||
virQEMUCapsSupportsI8042Toggle(virQEMUCaps *qemuCaps,
|
virQEMUCapsSupportsI8042Toggle(virQEMUCaps *qemuCaps,
|
||||||
const virDomainDef *def)
|
const char *machine,
|
||||||
|
const virArch arch)
|
||||||
{
|
{
|
||||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_I8042_OPT))
|
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_I8042_OPT))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return qemuDomainIsI440FX(def) ||
|
return qemuDomainMachineIsI440FX(machine, arch) ||
|
||||||
qemuDomainIsQ35(def) ||
|
qemuDomainMachineIsQ35(machine, arch) ||
|
||||||
qemuDomainIsXenFV(def) ||
|
qemuDomainMachineIsXenFV(machine, arch) ||
|
||||||
STREQ(def->os.machine, "isapc");
|
STREQ(machine, "isapc");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -723,7 +723,8 @@ bool virQEMUCapsSupportsI8042(virQEMUCaps *qemuCaps,
|
|||||||
const virDomainDef *def);
|
const virDomainDef *def);
|
||||||
|
|
||||||
bool virQEMUCapsSupportsI8042Toggle(virQEMUCaps *qemuCaps,
|
bool virQEMUCapsSupportsI8042Toggle(virQEMUCaps *qemuCaps,
|
||||||
const virDomainDef *def);
|
const char *machine,
|
||||||
|
const virArch arch);
|
||||||
|
|
||||||
const char *virQEMUCapsGetBinary(virQEMUCaps *qemuCaps);
|
const char *virQEMUCapsGetBinary(virQEMUCaps *qemuCaps);
|
||||||
virArch virQEMUCapsGetArch(virQEMUCaps *qemuCaps);
|
virArch virQEMUCapsGetArch(virQEMUCaps *qemuCaps);
|
||||||
|
@ -258,7 +258,7 @@ qemuValidateDomainDefFeatures(const virDomainDef *def,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (def->features[i] != VIR_TRISTATE_SWITCH_ABSENT &&
|
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",
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
_("ps2 feature state cannot be controlled with this QEMU binary"));
|
_("ps2 feature state cannot be controlled with this QEMU binary"));
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user