[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 40/51] qapi-commands: don't initialize command li
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PATCH v4 40/51] qapi-commands: don't initialize command list in qmp_init_marshall() |
Date: |
Thu, 11 Jan 2018 22:32:39 +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-commands.c | 1 +
4 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
index 8af8d913b9..7455d2b8bb 100644
--- a/scripts/qapi-commands.py
+++ b/scripts/qapi-commands.py
@@ -211,8 +211,6 @@ def gen_registry(registry):
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 c3a1a4ea6c..f5ffffa786 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1001,6 +1001,7 @@ 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 62a62755bd..b949b1ccb0 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -1360,6 +1360,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-commands.c b/tests/test-qmp-commands.c
index ad7b6e4e1d..28ce88e012 100644
--- a/tests/test-qmp-commands.c
+++ b/tests/test-qmp-commands.c
@@ -283,6 +283,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.0.rc1.1.gef27df75a1
- [Qemu-devel] [PATCH v4 30/51] qapi: add 'if' to alternate members, (continued)
- [Qemu-devel] [PATCH v4 30/51] qapi: add 'if' to alternate members, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 31/51] qapi: add #if conditions to generated code, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 32/51] docs: document schema configuration, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 33/51] qapi2texi: add 'If:' section to generated documentation, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 34/51] qapi2texi: add 'If:' condition to enum values, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 36/51] qapi2texi: add condition to variants, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 35/51] qapi2texi: add 'If:' condition to struct members, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 37/51] qapi: add conditions to VNC type/commands/events on the schema, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 38/51] qapi: add conditions to SPICE type/commands/events on the schema, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 39/51] qapi: add conditions to REPLICATION type/commands on the schema, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 40/51] qapi-commands: don't initialize command list in qmp_init_marshall(),
Marc-André Lureau <=
- [Qemu-devel] [PATCH v4 41/51] qapi: add -i/--include filename.h, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 42/51] qapi: add a 'unit' pragma, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 43/51] build-sys: move qmp-introspect per target, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 44/51] build-sys: add a target schema, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 45/51] qapi: make rtc-reset-reinjection depend on TARGET_I386, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 47/51] target.json: add a note about query-cpu* not being s390x-specific, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 46/51] qapi: make s390 commands depend on TARGET_S390X, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 48/51] qapi: make query-gic-capabilities depend on TARGET_ARM, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 49/51] qapi: make query-cpu-model-expansion depend on s390 or x86, Marc-André Lureau, 2018/01/11