From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMNRZ-0006sz-Uf for qemu-devel@nongnu.org; Fri, 04 Nov 2011 13:20:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RMNRY-0000dr-Ks for qemu-devel@nongnu.org; Fri, 04 Nov 2011 13:20:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMNRY-0000dl-Cf for qemu-devel@nongnu.org; Fri, 04 Nov 2011 13:20:40 -0400 Date: Fri, 4 Nov 2011 15:20:13 -0200 From: Luiz Capitulino Message-ID: <20111104152013.011f670f@doriath> In-Reply-To: References: <20111103163603.5123e0c9@doriath> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC] docs: Add writing-qmp-commands.txt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Supriya Kannery , Markus Armbruster , qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com On Fri, 4 Nov 2011 14:03:47 +0000 Stefan Hajnoczi wrote: > On Thu, Nov 3, 2011 at 6:36 PM, Luiz Capitulino = wrote: > > +Here's the implementation of the 'hello-world' HMP command: > > + > > +void hmp_hello_world(Monitor *mon, const QDict *qdict) > > +{ > > + =A0 =A0Error *errp =3D NULL; > > + =A0 =A0const char *message =3D qdict_get_str(qdict, "message"); >=20 > Since message is optional this should be qdict_get_try_str(). Good catch. That was my first version (and I did get an abort() there), but forgot to fix it in the doc. Thanks.