From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40436) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGIuN-0000xD-Sz for qemu-devel@nongnu.org; Fri, 24 Jun 2016 00:40:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGIuJ-0005VA-Ks for qemu-devel@nongnu.org; Fri, 24 Jun 2016 00:39:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGIuJ-0005V6-Co for qemu-devel@nongnu.org; Fri, 24 Jun 2016 00:39:55 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (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 9268D3710D1 for ; Fri, 24 Jun 2016 04:39:54 +0000 (UTC) References: <20160623000809.4522-1-marcandre.lureau@redhat.com> <20160623000809.4522-7-marcandre.lureau@redhat.com> From: Eric Blake Message-ID: <576CB991.60800@redhat.com> Date: Thu, 23 Jun 2016 22:39:45 -0600 MIME-Version: 1.0 In-Reply-To: <20160623000809.4522-7-marcandre.lureau@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="JXQre9A3hHC0L8VMJgNKb31UrUJbfXPwS" Subject: Re: [Qemu-devel] [PATCH 06/12] monitor: remove mhandler.cmd_new List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org Cc: armbru@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --JXQre9A3hHC0L8VMJgNKb31UrUJbfXPwS From: Eric Blake To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org Cc: armbru@redhat.com Message-ID: <576CB991.60800@redhat.com> Subject: Re: [PATCH 06/12] monitor: remove mhandler.cmd_new References: <20160623000809.4522-1-marcandre.lureau@redhat.com> <20160623000809.4522-7-marcandre.lureau@redhat.com> In-Reply-To: <20160623000809.4522-7-marcandre.lureau@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/22/2016 06:08 PM, marcandre.lureau@redhat.com wrote: > From: Marc-Andr=C3=A9 Lureau >=20 > This is no longer necessary, now that middle mode has been removed. >=20 > Signed-off-by: Marc-Andr=C3=A9 Lureau > --- > docs/writing-qmp-commands.txt | 8 +- > hmp-commands-info.hx | 118 ++++++++++++------------ > hmp-commands.hx | 206 +++++++++++++++++++++-------------= -------- > monitor.c | 11 +-- > 4 files changed, 168 insertions(+), 175 deletions(-) The changes to hmp-commands*.hx are mechanical; you may want to set up git to order the diff so that more relevant files like monitor.c are listed first. Do that by 'git config diff.orderFile /path/to/file', then in that file, listing globs in the order that you want to prioritize= =2E > +++ b/monitor.c > @@ -130,13 +130,10 @@ typedef struct mon_cmd_t { > const char *args_type; > const char *params; > const char *help; > - union { > - void (*cmd)(Monitor *mon, const QDict *qdict); > - void (*cmd_new)(QDict *params, QObject **ret_data, Error **err= p); > - } mhandler; > + void (*cmd)(Monitor *mon, const QDict *qdict); > /* @sub_table is a list of 2nd level of commands. If it do not exi= st, As long as you are touching this, fix the grammar bug: s/do/does/ > - * mhandler should be used. If it exist, sub_table[?].mhandler sho= uld be > - * used, and mhandler of 1st level plays the role of help function= =2E > + * cmd should be used. If it exist, sub_table[?].cmd should be s/exist/exists/ > + * used, and cmd of 1st level plays the role of help function. > */ > struct mon_cmd_t *sub_table; > void (*command_completion)(ReadLineState *rs, int nb_args, const c= har *str); > @@ -2927,7 +2924,7 @@ static void handle_hmp_command(Monitor *mon, cons= t char *cmdline) > return; > } > =20 > - cmd->mhandler.cmd(mon, qdict); > + cmd->cmd(mon, qdict); > QDECREF(qdict); > } > =20 >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --JXQre9A3hHC0L8VMJgNKb31UrUJbfXPwS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXbLmRAAoJEKeha0olJ0Nq59UH/iAE5cOA/7FFf9Az16c6xdGy qr9ZJMnTeNAgJJeoDevQEiebH6uNowRnj2GNifF/3Ali6rp14WXTjuelxuvNU0/W ViPsjvtu5R7qFxjLaM5jHZPX5w6szIbKoY5LccBjPyPKwowaEfD9Cn8nDYHp1tsf 9HYnTTfLMm1KmFZyjmbn4V7g9rJQsM9vjJTYUyYwGXYLm1NKVdwYgklmhp0oOe/B Dgt1Trjg2WySeq5etmiysI5nl6uVPYP3Zxu1mhpHkPQuNgEPQBcHtPQLqodL2CVp /bBGKrj0d5p+FknxP3aB7nivl/nestDxcBxs3HvfSB2Sx6wKqys/K4hVbvesTiU= =2Q3E -----END PGP SIGNATURE----- --JXQre9A3hHC0L8VMJgNKb31UrUJbfXPwS--