From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMKN7-0001I5-4K for qemu-devel@nongnu.org; Fri, 04 Nov 2011 10:03:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RMKN2-0001yz-PS for qemu-devel@nongnu.org; Fri, 04 Nov 2011 10:03:52 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:32773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMKN2-0001yu-Fg for qemu-devel@nongnu.org; Fri, 04 Nov 2011 10:03:48 -0400 Received: by wyh22 with SMTP id 22so2597596wyh.4 for ; Fri, 04 Nov 2011 07:03:47 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20111103163603.5123e0c9@doriath> References: <20111103163603.5123e0c9@doriath> Date: Fri, 4 Nov 2011 14:03:47 +0000 Message-ID: From: Stefan Hajnoczi 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: Luiz Capitulino Cc: Supriya Kannery , Markus Armbruster , qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com On Thu, Nov 3, 2011 at 6:36 PM, Luiz Capitulino wr= ote: > +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"); Since message is optional this should be qdict_get_try_str(). Stefan