@@ -17,9 +17,6 @@
* add new ones!
*/
-#define QERR_INVALID_PARAMETER_TYPE \
- "Invalid parameter type for '%s', expected: %s"
-
#define QERR_INVALID_PARAMETER_VALUE \
"Parameter '%s' expects %s"
@@ -23,7 +23,6 @@
#include "qapi/qobject-input-visitor.h"
#include "qapi/forward-visitor.h"
#include "qapi/qapi-builtin-visit.h"
-#include "qapi/qmp/qerror.h"
#include "qapi/qmp/qjson.h"
#include "trace.h"
@@ -1912,7 +1911,8 @@ static Object *object_resolve_link(Object *obj, const char *name,
} else if (!target) {
target = object_resolve_path(path, &ambiguous);
if (target || ambiguous) {
- error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name, target_type);
+ error_setg(errp, "Invalid parameter type for '%s', expected: %s",
+ name, target_type);
} else {
error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,
"Device '%s' not found", path);
@@ -278,8 +278,8 @@ def gen_visit_alternate(name: str, variants: QAPISchemaVariants) -> str:
abort();
default:
assert(visit_is_input(v));
- error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name ? name : "null",
- "%(name)s");
+ error_setg(errp, "Invalid parameter type for '%%s', expected: %(name)s",
+ name ? name : "null");
/* Avoid passing invalid *obj to qapi_free_%(c_name)s() */
g_free(*obj);
*obj = NULL;
@@ -356,7 +356,6 @@ def _begin_user_module(self, name: str) -> None:
self._genc.preamble_add(mcgen('''
#include "qemu/osdep.h"
#include "qapi/error.h"
-#include "qapi/qmp/qerror.h"
#include "%(visit)s.h"
''',
visit=visit))