Received: from eggs.gnu.org ([2001:4830:134:3::10]:39608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bm1dZ-0006Js-Iz for qemu-devel@nongnu.org; Mon, 19 Sep 2016 12:41:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bm1dW-0008MG-9G for qemu-devel@nongnu.org; Mon, 19 Sep 2016 12:41:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33034) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bm1dW-0008Lv-2Q for qemu-devel@nongnu.org; Mon, 19 Sep 2016 12:41:42 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 91DB29E62D for ; Mon, 19 Sep 2016 16:41:41 +0000 (UTC) From: Markus Armbruster Date: Mon, 19 Sep 2016 18:41:21 +0200 Message-Id: <1474303294-13952-6-git-send-email-armbru@redhat.com> In-Reply-To: <1474303294-13952-1-git-send-email-armbru@redhat.com> References: <1474303294-13952-1-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 05/18] monitor: register gen:false commands manually List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= From: Marc-Andr=C3=A9 Lureau 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=C3=A9 Lureau Reviewed-by: Eric Blake Message-Id: <20160912091913.15831-6-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- monitor.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/monitor.c b/monitor.c index e156026..b7ae552 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" =20 /* for hmp_info_irq/pic */ #if defined(TARGET_SPARC) @@ -1007,6 +1008,18 @@ static void qmp_query_qmp_schema(QDict *qdict, QOb= ject **ret_data, *ret_data =3D qobject_from_json(qmp_schema_json); } =20 +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) { --=20 2.5.5