mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
util: Emit proper error code in virTypedParamsValidate
When unsupported parameter is passed to virTypedParamsValidate, VIR_ERR_ARGUMENT_UNSUPPORTED should be returned rather than VIR_ERR_INVALID_ARG, which is more appropriate for supported parameters used incorrectly.
This commit is contained in:
parent
c40ed4168a
commit
40369ea674
@ -87,7 +87,7 @@ virTypedParamsValidate(virTypedParameterPtr params, int nparams, ...)
|
||||
name = va_arg(ap, const char *);
|
||||
}
|
||||
if (!name) {
|
||||
virReportError(VIR_ERR_INVALID_ARG,
|
||||
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
|
||||
_("parameter '%s' not supported"),
|
||||
params[i].field);
|
||||
goto cleanup;
|
||||
|
Loading…
Reference in New Issue
Block a user