mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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_MOUSE:
|
||||||
case VIR_DOMAIN_INPUT_TYPE_TABLET:
|
case VIR_DOMAIN_INPUT_TYPE_TABLET:
|
||||||
case VIR_DOMAIN_INPUT_TYPE_KBD:
|
case VIR_DOMAIN_INPUT_TYPE_KBD:
|
||||||
case VIR_DOMAIN_INPUT_TYPE_LAST:
|
|
||||||
if (input->source.evdev) {
|
if (input->source.evdev) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
_("setting source evdev path only supported for "
|
_("setting source evdev path only supported for "
|
||||||
@ -5771,6 +5770,11 @@ virDomainInputDefValidate(const virDomainInputDef *input)
|
|||||||
|
|
||||||
case VIR_DOMAIN_INPUT_TYPE_PASSTHROUGH:
|
case VIR_DOMAIN_INPUT_TYPE_PASSTHROUGH:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case VIR_DOMAIN_INPUT_TYPE_LAST:
|
||||||
|
default:
|
||||||
|
virReportEnumRangeError(virDomainInputType, input->type);
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user