The function only calls various register_command() now, use a more descriptive name.
Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- 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