mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
conf: report enum errors in virDomainInputDefValidate
Commit deb057f added a switch without a default case. Add it and call virReportEnumRangeError for _LAST too. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
ea119118fc
commit
995b50ff58
@ -5760,7 +5760,6 @@ virDomainInputDefValidate(const virDomainInputDef *input)
|
||||
case VIR_DOMAIN_INPUT_TYPE_MOUSE:
|
||||
case VIR_DOMAIN_INPUT_TYPE_TABLET:
|
||||
case VIR_DOMAIN_INPUT_TYPE_KBD:
|
||||
case VIR_DOMAIN_INPUT_TYPE_LAST:
|
||||
if (input->source.evdev) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("setting source evdev path only supported for "
|
||||
@ -5771,6 +5770,11 @@ virDomainInputDefValidate(const virDomainInputDef *input)
|
||||
|
||||
case VIR_DOMAIN_INPUT_TYPE_PASSTHROUGH:
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_INPUT_TYPE_LAST:
|
||||
default:
|
||||
virReportEnumRangeError(virDomainInputType, input->type);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user