diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2018-07-03 17:56:48 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2018-07-03 18:38:54 +0200 |
commit | 514337c142f9522f6ab89c3d2f964f446ebeb1cd (patch) | |
tree | 0c59030dbfef59f833cac931f65fa1371006066a /qmp.c | |
parent | 05eb4a25aea245575503b03bc882a64ae70fcaad (diff) |
qapi: add conditions to SPICE type/commands/events on the schema
Add #if defined(CONFIG_SPICE) in generated code, and adjust the
qmp/hmp code accordingly.
query-qmp-schema no longer reports the command/events etc as
available when disabled at compile time.
Commands made conditional:
* query-spice
Before the patch, the command for !CONFIG_SPICE is unregistered. It
will fail with the same error.
Events made conditional:
* SPICE_CONNECTED, SPICE_INITIALIZED, SPICE_DISCONNECTED,
SPICE_MIGRATE_COMPLETED
Add TODO for conditional SPICE chardevs, delayed until the supports
for conditional members lands.
No HMP change, the code was already conditional.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180703155648.11933-15-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qmp.c')
-rw-r--r-- | qmp.c | 16 |
1 files changed, 0 insertions, 16 deletions
@@ -129,22 +129,6 @@ void qmp_cpu_add(int64_t id, Error **errp) } } -#ifndef CONFIG_SPICE -/* - * qmp_unregister_commands_hack() ensures that QMP command query-spice - * exists only #ifdef CONFIG_SPICE. Necessary for an accurate - * query-commands result. However, the QAPI schema is blissfully - * unaware of that, and the QAPI code generator happily generates a - * dead qmp_marshal_query_spice() that calls qmp_query_spice(). - * Provide it one, or else linking fails. FIXME Educate the QAPI - * schema on CONFIG_SPICE. - */ -SpiceInfo *qmp_query_spice(Error **errp) -{ - abort(); -}; -#endif - void qmp_exit_preconfig(Error **errp) { if (!runstate_check(RUN_STATE_PRECONFIG)) { |