]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - qapi/qmp-dispatch.c
qapi: Delete all the "foo: dropped in n.n" notes
[thirdparty/qemu.git] / qapi / qmp-dispatch.c
index e2c366e09e972af458ff0cdd9c9d21e0a2d63f7c..bc264b3c9b5d48c6774f6b0cf2ee32bc8b7a8c62 100644 (file)
@@ -16,8 +16,8 @@
 #include "qapi/qmp/dispatch.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qjson.h"
+#include "sysemu/runstate.h"
 #include "qapi/qmp/qbool.h"
-#include "sysemu/sysemu.h"
 
 static QDict *qmp_dispatch_check_obj(const QObject *request, bool allow_oob,
                                      Error **errp)
@@ -104,8 +104,9 @@ static QObject *do_qmp_dispatch(QmpCommandList *cmds, QObject *request,
         return NULL;
     }
     if (!cmd->enabled) {
-        error_setg(errp, "The command %s has been disabled for this instance",
-                   command);
+        error_set(errp, ERROR_CLASS_COMMAND_NOT_FOUND,
+                  "The command %s has been disabled for this instance",
+                  command);
         return NULL;
     }
     if (oob && !(cmd->options & QCO_ALLOW_OOB)) {