From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37813) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXAdn-0007Ae-VR for qemu-devel@nongnu.org; Tue, 09 Aug 2016 13:16:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXAdm-0007s9-MS for qemu-devel@nongnu.org; Tue, 09 Aug 2016 13:16:35 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:34562) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXAdm-0007ri-BK for qemu-devel@nongnu.org; Tue, 09 Aug 2016 13:16:34 -0400 Received: by mail-wm0-x242.google.com with SMTP id q128so4482764wma.1 for ; Tue, 09 Aug 2016 10:16:34 -0700 (PDT) MIME-Version: 1.0 References: <20160808141439.16908-1-marcandre.lureau@redhat.com> <20160808141439.16908-4-marcandre.lureau@redhat.com> <87popiidlj.fsf@dusky.pond.sub.org> In-Reply-To: <87popiidlj.fsf@dusky.pond.sub.org> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Tue, 09 Aug 2016 17:16:23 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 03/15] monitor: register gen:false commands manually List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org On Tue, Aug 9, 2016 at 11:54 AM Markus Armbruster wrote= : > marcandre.lureau@redhat.com writes: > > > 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 this function isn't run yet, until > > "these functions aren't" > > Can touch up on commit. > I meant the qmp_init_marshal(), I'll correct the comment. > > > module_call_init(MODULE_INIT_QAPI) is added in a later patch. > > > > Signed-off-by: Marc-Andr=C3=A9 Lureau > > Reviewed-by: Eric Blake > > --- > > monitor.c | 13 +++++++++++++ > > 1 file changed, 13 insertions(+) > > > > diff --git a/monitor.c b/monitor.c > > index cb1a0c7..c9191e5 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) > > @@ -1000,6 +1001,18 @@ static void qmp_query_qmp_schema(QDict *qdict, > QObject **ret_data, > > *ret_data =3D 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) > > { > > -- Marc-Andr=C3=A9 Lureau