diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-09-12 13:19:00 +0400 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2016-09-19 17:32:21 +0200 |
commit | edcfaefe07e242f204d476a8f2290895593eb09f (patch) | |
tree | d35dece4252277fbd06853c80549627057107365 | |
parent | d79bedfa404a02a4652cc8d964fa6dc9b7ec62f7 (diff) | |
download | qemu-edcfaefe07e242f204d476a8f2290895593eb09f.zip qemu-edcfaefe07e242f204d476a8f2290895593eb09f.tar.gz qemu-edcfaefe07e242f204d476a8f2290895593eb09f.tar.bz2 |
monitor: register gen:false commands manually
Since a few commands are using 'gen': false, they are not registered
automatically by the generator. Register manually instead.
This is in preparation for removal of qapi 'middle' mode generation.
Note that qmp_init_marshal() function isn't run yet, so the commands
aren't actually registered, until module_call_init(MODULE_INIT_QAPI) is
added in a later patch.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20160912091913.15831-6-marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
-rw-r--r-- | monitor.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -79,6 +79,7 @@ #include "sysemu/block-backend.h" #include "sysemu/qtest.h" #include "qemu/cutils.h" +#include "qapi/qmp/dispatch.h" /* for hmp_info_irq/pic */ #if defined(TARGET_SPARC) @@ -1007,6 +1008,18 @@ static void qmp_query_qmp_schema(QDict *qdict, QObject **ret_data, *ret_data = qobject_from_json(qmp_schema_json); } +static void qmp_init_marshal(void) +{ + qmp_register_command("query-qmp-schema", qmp_query_qmp_schema, + QCO_NO_OPTIONS); + qmp_register_command("device_add", qmp_device_add, + QCO_NO_OPTIONS); + qmp_register_command("netdev_add", qmp_netdev_add, + QCO_NO_OPTIONS); +} + +qapi_init(qmp_init_marshal); + /* set the current CPU defined by the user */ int monitor_set_cpu(int cpu_index) { |