]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - qom/object.c
qapi: Inline and remove QERR_INVALID_PARAMETER_TYPE definition
[thirdparty/qemu.git] / qom / object.c
index 3d96818f7d002b5af24248b9ca3376298ac4557b..44ec8f6460f60f0aa63493f3a0381e3db37c6021 100644 (file)
@@ -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);