[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 03/13] qapi-commands: rename init_marshal() to regis
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PATCH 03/13] qapi-commands: rename init_marshal() to register_commands() |
Date: |
Sun, 16 Dec 2018 18:08:52 +0400 |
The function only calls various register_command() now, use a more
descriptive name.
Signed-off-by: Marc-André Lureau <address@hidden>
---
scripts/qapi/commands.py | 4 ++--
monitor.c | 2 +-
qga/main.c | 2 +-
tests/test-qmp-cmds.c | 2 +-
docs/devel/qapi-code-gen.txt | 4 ++--
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/scripts/qapi/commands.py b/scripts/qapi/commands.py
index a9b2ecb304..94313b8aef 100644
--- a/scripts/qapi/commands.py
+++ b/scripts/qapi/commands.py
@@ -220,7 +220,7 @@ def gen_register_command(name, success_response, allow_oob,
allow_preconfig):
def gen_registry(registry, prefix):
ret = mcgen('''
-void %(c_prefix)sqmp_init_marshal(QmpCommandList *cmds)
+void %(c_prefix)sqmp_register_commands(QmpCommandList *cmds)
{
''',
c_prefix=c_name(prefix, protect=False))
@@ -270,7 +270,7 @@ class
QAPISchemaGenCommandVisitor(QAPISchemaModularCVisitor):
def visit_end(self):
(genc, genh) = self._module[self._main_module]
genh.add(mcgen('''
-void %(c_prefix)sqmp_init_marshal(QmpCommandList *cmds);
+void %(c_prefix)sqmp_register_commands(QmpCommandList *cmds);
''',
c_prefix=c_name(self._prefix, protect=False)))
genc.add(gen_registry(self._regy.get_content(), self._prefix))
diff --git a/monitor.c b/monitor.c
index 30e8926002..720d8d98a7 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1182,7 +1182,7 @@ static void monitor_init_qmp_commands(void)
*/
QTAILQ_INIT(&qmp_commands);
- qmp_init_marshal(&qmp_commands);
+ qmp_register_commands(&qmp_commands);
qmp_register_command(&qmp_commands, "query-qmp-schema",
qmp_query_qmp_schema, QCO_ALLOW_PRECONFIG);
diff --git a/qga/main.c b/qga/main.c
index 1d6c1024c9..75496fa793 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -1487,7 +1487,7 @@ int main(int argc, char **argv)
config->log_level = G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL;
QTAILQ_INIT(&ga_commands);
- qga_qmp_init_marshal(&ga_commands);
+ qga_qmp_register_commands(&ga_commands);
init_dfl_pathnames();
config_load(config);
diff --git a/tests/test-qmp-cmds.c b/tests/test-qmp-cmds.c
index bbd52cfb69..039ffcc6a9 100644
--- a/tests/test-qmp-cmds.c
+++ b/tests/test-qmp-cmds.c
@@ -326,7 +326,7 @@ int main(int argc, char **argv)
g_test_add_func("/qmp/dealloc_partial", test_dealloc_partial);
QTAILQ_INIT(&qmp_commands);
- test_qmp_init_marshal(&qmp_commands);
+ test_qmp_register_commands(&qmp_commands);
g_test_run();
return 0;
diff --git a/docs/devel/qapi-code-gen.txt b/docs/devel/qapi-code-gen.txt
index 681177dec1..79a38c21e6 100644
--- a/docs/devel/qapi-code-gen.txt
+++ b/docs/devel/qapi-code-gen.txt
@@ -1271,7 +1271,7 @@ Example:
UserDefOne *qmp_my_command(UserDefOneList *arg1, Error **errp);
void qmp_marshal_my_command(QDict *args, QObject **ret, Error **errp);
- void example_qmp_init_marshal(QmpCommandList *cmds);
+ void example_qmp_register_commands(QmpCommandList *cmds);
#endif /* EXAMPLE_QAPI_COMMANDS_H */
$ cat qapi-generated/example-qapi-commands.c
@@ -1332,7 +1332,7 @@ Example:
visit_free(v);
}
- void example_qmp_init_marshal(QmpCommandList *cmds)
+ void example_qmp_register_commands(QmpCommandList *cmds)
{
qmp_register_command(cmds, "my-command",
qmp_marshal_my_command, QCO_NO_OPTIONS);
--
2.20.0
- [Qemu-devel] [PATCH 00/13] qapi: add #if pre-processor conditions to generated code (part 3), Marc-André Lureau, 2018/12/16
- [Qemu-devel] [PATCH 01/13] build-sys: move qmp-introspect per target, Marc-André Lureau, 2018/12/16
- [Qemu-devel] [PATCH 02/13] qapi-commands: don't initialize command list in qmp_init_marshall(), Marc-André Lureau, 2018/12/16
- [Qemu-devel] [PATCH 03/13] qapi-commands: rename init_marshal() to register_commands(),
Marc-André Lureau <=
- [Qemu-devel] [PATCH 04/13] RFC: qapi: learn to split the schema by 'top-unit', Marc-André Lureau, 2018/12/16
- [Qemu-devel] [PATCH 05/13] qapi: add a top-unit 'target' schema, Marc-André Lureau, 2018/12/16
- [Qemu-devel] [PATCH 06/13] qapi: make rtc-reset-reinjection and SEV depend on TARGET_I386, Marc-André Lureau, 2018/12/16
- [Qemu-devel] [PATCH 07/13] qapi: make s390 commands depend on TARGET_S390X, Marc-André Lureau, 2018/12/16
- [Qemu-devel] [PATCH 08/13] target.json: add a note about query-cpu* not being s390x-specific, Marc-André Lureau, 2018/12/16
- [Qemu-devel] [PATCH 09/13] qapi: make query-gic-capabilities depend on TARGET_ARM, Marc-André Lureau, 2018/12/16
- [Qemu-devel] [PATCH 10/13] qapi: make query-cpu-model-expansion depend on s390 or x86, Marc-André Lureau, 2018/12/16
- [Qemu-devel] [PATCH 11/13] qapi: make query-cpu-definitions depend on specific targets, Marc-André Lureau, 2018/12/16