From patchwork Wed Aug 10 18:02:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 657771 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3s8fKN3PkKz9sRB for ; Thu, 11 Aug 2016 04:08:40 +1000 (AEST) Received: from localhost ([::1]:43042 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXXvh-0004nc-Rk for incoming@patchwork.ozlabs.org; Wed, 10 Aug 2016 14:08:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47048) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXXqL-0006DS-04 for qemu-devel@nongnu.org; Wed, 10 Aug 2016 14:03:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXXqJ-0005mH-3l for qemu-devel@nongnu.org; Wed, 10 Aug 2016 14:03:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXXqI-0005mB-VC for qemu-devel@nongnu.org; Wed, 10 Aug 2016 14:03:03 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (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 8F3943919A9 for ; Wed, 10 Aug 2016 18:03:02 +0000 (UTC) Received: from localhost (ovpn-116-67.phx2.redhat.com [10.3.116.67]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7AI2xjM007000; Wed, 10 Aug 2016 14:03:01 -0400 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Date: Wed, 10 Aug 2016 22:02:23 +0400 Message-Id: <20160810180235.32469-6-marcandre.lureau@redhat.com> In-Reply-To: <20160810180235.32469-1-marcandre.lureau@redhat.com> References: <20160810180235.32469-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 10 Aug 2016 18:03:02 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v4 05/17] monitor: register gen:false commands manually X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , armbru@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Marc-André 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 registered, until module_call_init(MODULE_INIT_QAPI) is added in a later patch. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- 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" /* 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) {