]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
qapi: Move and rename qapi/qmp/dispatch.h to qapi/qmp-registry.h
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 18 Nov 2024 15:12:35 +0000 (16:12 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 10 Feb 2025 14:33:29 +0000 (15:33 +0100)
The general expectation is that header files should follow the same
file/path naming scheme as the corresponding source file. There are
various historical exceptions to this practice in QEMU, with one of
the most notable being the include/qapi/qmp/ directory.

include/qapi/qmp/dispatch.h corresponds mostly to qapi/qmp-registry.c.
Move and rename it to include/qapi/qmp-registry.h.

Now just qerror.h is left in include/qapi/qmp/.  Since it's deprecated
& (slowly) getting eliminated anyway, it isn't worth moving.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20241118151235.2665921-3-armbru@redhat.com>

docs/devel/qapi-code-gen.rst
include/qapi/qmp-registry.h [moved from include/qapi/qmp/dispatch.h with 100% similarity]
monitor/monitor-internal.h
qapi/qmp-dispatch.c
qapi/qmp-registry.c
qga/guest-agent-core.h
scripts/qapi/commands.py
stubs/qmp-command-available.c
stubs/qmp-quit.c
system/qdev-monitor.c

index 259d6b10c3d9dcae30e6f2028a369a1bb56f850d..9fa94251b072fa6cb00c4a77ce32b7817fe8a0a2 100644 (file)
@@ -1855,7 +1855,7 @@ Example::
     #ifndef EXAMPLE_QAPI_INIT_COMMANDS_H
     #define EXAMPLE_QAPI_INIT_COMMANDS_H
 
-    #include "qapi/qmp/dispatch.h"
+    #include "qapi/qmp-registry.h"
 
     void example_qmp_init_marshal(QmpCommandList *cmds);
 
index 72cab703ebb14af9a93c45f7a537993c41f6fced..5676eb334e81580a371d36605a24fffffec25a22 100644 (file)
@@ -28,7 +28,7 @@
 #include "chardev/char-fe.h"
 #include "monitor/monitor.h"
 #include "qapi/qapi-types-control.h"
-#include "qapi/qmp/dispatch.h"
+#include "qapi/qmp-registry.h"
 #include "qobject/json-parser.h"
 #include "qemu/readline.h"
 #include "system/iothread.h"
index e24ba9f0b60667e457b23bd9b5eaa2f72fef2b49..fa95fcceacd690ab05ebc37d928e03a3178c2fbd 100644 (file)
@@ -16,7 +16,7 @@
 #include "block/aio.h"
 #include "qapi/compat-policy.h"
 #include "qapi/error.h"
-#include "qapi/qmp/dispatch.h"
+#include "qapi/qmp-registry.h"
 #include "qobject/qdict.h"
 #include "qobject/qjson.h"
 #include "qapi/qobject-input-visitor.h"
index 485bc5e6fc713ebd0d44888c2be4fc31a00d988c..ac989074edd01de605d535ac3fb6c7e01eb2aa48 100644 (file)
@@ -13,7 +13,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "qapi/qmp/dispatch.h"
+#include "qapi/qmp-registry.h"
 
 void qmp_register_command(QmpCommandList *cmds, const char *name,
                           QmpCommandFunc *fn, QmpCommandOptions options,
index b4e7c52c611f74ee69a98ac82950812acf0ba477..a536d07d0d354e40e63a2a4763b1ce089f5ab525 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef GUEST_AGENT_CORE_H
 #define GUEST_AGENT_CORE_H
 
-#include "qapi/qmp/dispatch.h"
+#include "qapi/qmp-registry.h"
 #include "qga-qapi-types.h"
 
 #define QGA_READ_COUNT_DEFAULT 4096
index f0aa13b5cf913de9de1f7468a55a0c9e3b4bacd3..74f341b2c7efabc1bb6ca77856d946e942b827b5 100644 (file)
@@ -346,7 +346,7 @@ class QAPISchemaGenCommandVisitor(QAPISchemaModularCVisitor):
     def visit_begin(self, schema: QAPISchema) -> None:
         self._add_module('./init', ' * QAPI Commands initialization')
         self._genh.add(mcgen('''
-#include "qapi/qmp/dispatch.h"
+#include "qapi/qmp-registry.h"
 
 void %(c_prefix)sqmp_init_marshal(QmpCommandList *cmds);
 ''',
index 46540af7bfca4e44a27084f8ded6ccf86267a0f3..8851faced1323a82989864e8f658f42420f8cbe6 100644 (file)
@@ -1,5 +1,5 @@
 #include "qemu/osdep.h"
-#include "qapi/qmp/dispatch.h"
+#include "qapi/qmp-registry.h"
 
 bool qmp_command_available(const QmpCommand *cmd, Error **errp)
 {
index a3ff47f7bdbf456e143d18212ace7fdbfce95c37..8fb523e905016a3477afe2c2e2a3ab6fb282651b 100644 (file)
@@ -1,6 +1,6 @@
 #include "qemu/osdep.h"
 #include "qapi/qapi-commands-control.h"
-#include "qapi/qmp/dispatch.h"
+#include "qapi/qmp-registry.h"
 
 void qmp_quit(Error **errp)
 {
index 81fe531bd6d53810081d903325d0c09fe8eaf241..856c9e8c32eab0379e6112789cc7300c8d967045 100644 (file)
@@ -26,7 +26,7 @@
 #include "system/runstate.h"
 #include "qapi/error.h"
 #include "qapi/qapi-commands-qdev.h"
-#include "qapi/qmp/dispatch.h"
+#include "qapi/qmp-registry.h"
 #include "qobject/qdict.h"
 #include "qapi/qmp/qerror.h"
 #include "qobject/qstring.h"