From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tum2h-0002WS-AI for qemu-devel@nongnu.org; Mon, 14 Jan 2013 10:33:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tum2b-0004KB-Av for qemu-devel@nongnu.org; Mon, 14 Jan 2013 10:33:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:6905) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tum2b-0004K5-27 for qemu-devel@nongnu.org; Mon, 14 Jan 2013 10:33:37 -0500 Date: Mon, 14 Jan 2013 13:33:28 -0200 From: Luiz Capitulino Message-ID: <20130114133328.08cd31f7@doriath.home> In-Reply-To: <87zk0bx4g4.fsf@blackfin.pond.sub.org> References: <1357895645-30359-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1357895645-30359-5-git-send-email-xiawenc@linux.vnet.ibm.com> <20130111181209.5f045b19@doriath.home> <50F36940.7050709@linux.vnet.ibm.com> <87zk0bx4g4.fsf@blackfin.pond.sub.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V5 4/6] HMP: filter out space before check of sub-command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: aliguori@us.ibm.com, Wenchao Xia , chenwj@iis.sinica.edu.tw, qemu-devel@nongnu.org On Mon, 14 Jan 2013 14:46:35 +0100 Markus Armbruster wrote: > Wenchao Xia writes: >=20 > > =E4=BA=8E 2013-1-12 4:12, Luiz Capitulino =E5=86=99=E9=81=93: > >> On Fri, 11 Jan 2013 17:14:03 +0800 > >> Wenchao Xia wrote: > >> > >>> This fix the case when user input "@command ". Original > >>> it will return NULL for monitor_parse_command(), now > >>> it will return the @command related instance. > >>> > >>> Signed-off-by: Wenchao Xia > >>> --- > >>> monitor.c | 3 +++ > >>> 1 files changed, 3 insertions(+), 0 deletions(-) > >>> > >>> diff --git a/monitor.c b/monitor.c > >>> index 5435dc3..7b752a2 100644 > >>> --- a/monitor.c > >>> +++ b/monitor.c > >>> @@ -3588,6 +3588,9 @@ static const mon_cmd_t *monitor_parse_command(M= onitor *mon, > >>> if (cmd->sub_table !=3D NULL) { > >>> p1 =3D p; > >>> /* check if user set additional command */ > >>> + while (qemu_isspace(*p1)) { > >>> + p1++; > >>> + } > >> > >> Is there a reason for this to be in a different patch? I mean, why don= 't > >> you squash this into the previous patch? > >> > > Markus suggest to do it >=20 > Misunderstanding, sorry. My point was we skip over whitespace twice: > first here, and then again in monitor_parse_command(). Quote: That was my point in my second paragraph (which cut out).