qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 03/12] monitor: register gen:false commands manually


From: marcandre . lureau
Subject: [Qemu-devel] [PATCH 03/12] monitor: register gen:false commands manually
Date: Thu, 23 Jun 2016 02:08:00 +0200

From: Marc-André Lureau <address@hidden>

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.

Signed-off-by: Marc-André Lureau <address@hidden>
---
 monitor.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/monitor.c b/monitor.c
index 63f7086..fc691b9 100644
--- a/monitor.c
+++ b/monitor.c
@@ -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)
@@ -987,6 +988,16 @@ 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);
+}
+
+qapi_init(qmp_init_marshal);
+
 /* set the current CPU defined by the user */
 int monitor_set_cpu(int cpu_index)
 {
-- 
2.9.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]