@@ -17,9 +17,6 @@
* add new ones!
*/
-#define QERR_MISSING_PARAMETER \
- "Parameter '%s' is missing"
-
#define QERR_PROPERTY_VALUE_BAD \
"Property '%s.%s' doesn't take value '%s'"
@@ -218,7 +218,7 @@ lookup_distinct(const OptsVisitor *ov, const char *name, Error **errp)
list = g_hash_table_lookup(ov->unprocessed_opts, name);
if (!list) {
- error_setg(errp, QERR_MISSING_PARAMETER, name);
+ error_setg(errp, "Parameter '%s' is missing", name);
}
return list;
}
@@ -49,7 +49,7 @@ static bool forward_field_translate_name(ForwardFieldVisitor *v, const char **na
*name = v->to;
return true;
}
- error_setg(errp, QERR_MISSING_PARAMETER, *name);
+ error_setg(errp, "Parameter '%s' is missing", *name);
return false;
}
@@ -168,7 +168,7 @@ static QObject *qobject_input_get_object(QObjectInputVisitor *qiv,
QObject *obj = qobject_input_try_get_object(qiv, name, consume);
if (!obj) {
- error_setg(errp, QERR_MISSING_PARAMETER, full_name(qiv, name));
+ error_setg(errp, "Parameter '%s' is missing", full_name(qiv, name));
}
return obj;
}
Address the comment added in commit 4629ed1e98 ("qerror: Finally unused, clean up"), from 2015: /* * These macros will go away, please don't use * in new code, and do not add new ones! */ Mechanical transformation using sed, manually removing the definition in include/qapi/qmp/qerror.h. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- include/qapi/qmp/qerror.h | 3 --- qapi/opts-visitor.c | 2 +- qapi/qapi-forward-visitor.c | 2 +- qapi/qobject-input-visitor.c | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-)