[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 39/49] qapi-commands: don't initialize command li
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PATCH v3 39/49] qapi-commands: don't initialize command list in qmp_init_marshall() |
Date: |
Wed, 21 Mar 2018 12:52:01 +0100 |
This will let the caller add several list of commands coming from
different schemas (the following patches split the schemas for common
and arch-specific parts).
Signed-off-by: Marc-André Lureau <address@hidden>
---
scripts/qapi/commands.py | 2 --
monitor.c | 1 +
qga/main.c | 1 +
tests/test-qmp-cmds.c | 1 +
4 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/scripts/qapi/commands.py b/scripts/qapi/commands.py
index 40bb680b7c..3d3e97f737 100644
--- a/scripts/qapi/commands.py
+++ b/scripts/qapi/commands.py
@@ -220,8 +220,6 @@ def gen_registry(registry, prefix):
void %(c_prefix)sqmp_init_marshal(QmpCommandList *cmds)
{
- QTAILQ_INIT(cmds);
-
''',
c_prefix=c_name(prefix, protect=False))
ret += registry
diff --git a/monitor.c b/monitor.c
index 88e6fd2e6f..0d84c3edb4 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1121,6 +1121,7 @@ static void monitor_init_qmp_commands(void)
* "qmp_capabilities", to enforce capability negotiation
*/
+ QTAILQ_INIT(&qmp_commands);
qmp_init_marshal(&qmp_commands);
qmp_register_command(&qmp_commands, "query-qmp-schema",
diff --git a/qga/main.c b/qga/main.c
index df1888edc1..6905c82b6c 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -1364,6 +1364,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);
init_dfl_pathnames();
diff --git a/tests/test-qmp-cmds.c b/tests/test-qmp-cmds.c
index e675722593..e723b440ca 100644
--- a/tests/test-qmp-cmds.c
+++ b/tests/test-qmp-cmds.c
@@ -285,6 +285,7 @@ int main(int argc, char **argv)
g_test_add_func("/0.15/dealloc_types", test_dealloc_types);
g_test_add_func("/0.15/dealloc_partial", test_dealloc_partial);
+ QTAILQ_INIT(&qmp_commands);
test_qmp_init_marshal(&qmp_commands);
g_test_run();
--
2.16.2.521.g9aa15f885a
- [Qemu-devel] [PATCH v3 29/49] qapi: add #if conditions to generated code members, (continued)
- [Qemu-devel] [PATCH v3 29/49] qapi: add #if conditions to generated code members, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 32/49] qapi2texi: add 'If:' condition to enum values, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 30/49] docs: document schema configuration, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 31/49] qapi2texi: add 'If:' section to generated documentation, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 33/49] qapi2texi: add 'If:' condition to struct members, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 35/49] qapi: add conditions to VNC type/commands/events on the schema, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 34/49] qapi2texi: add condition to variants, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 36/49] qapi: add conditions to SPICE type/commands/events on the schema, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 37/49] qapi: add conditions to REPLICATION type/commands on the schema, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 38/49] build-sys: move qmp-introspect per target, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 39/49] qapi-commands: don't initialize command list in qmp_init_marshall(),
Marc-André Lureau <=
- [Qemu-devel] [PATCH v3 40/49] RFC: qapi: learn to split schema by 'top-unit', Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 41/49] qapi: add a top-unit 'target' schema, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 44/49] target.json: add a note about query-cpu* not being s390x-specific, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 42/49] qapi: make rtc-reset-reinjection and SEV depend on TARGET_I386, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 43/49] qapi: make s390 commands depend on TARGET_S390X, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 45/49] qapi: make query-gic-capabilities depend on TARGET_ARM, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 46/49] qapi: make query-cpu-model-expansion depend on s390 or x86, Marc-André Lureau, 2018/03/21