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.
---
src/util/virtypedparam.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virtypedparam.c b/src/util/virtypedparam.c
index 8b2211f..eef9e30 100644
--- a/src/util/virtypedparam.c
+++ b/src/util/virtypedparam.c
@@ -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;
--
1.8.2.1