From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55069) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuZWL-0007Q5-0e for qemu-devel@nongnu.org; Sun, 13 Jan 2013 21:11:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TuZWF-0007uH-7L for qemu-devel@nongnu.org; Sun, 13 Jan 2013 21:11:28 -0500 Received: from e28smtp06.in.ibm.com ([122.248.162.6]:60671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuZWE-0007tp-KC for qemu-devel@nongnu.org; Sun, 13 Jan 2013 21:11:23 -0500 Received: from /spool/local by e28smtp06.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 14 Jan 2013 07:39:40 +0530 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id 6E703E004C for ; Mon, 14 Jan 2013 07:41:33 +0530 (IST) Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r0E2BDLe41811974 for ; Mon, 14 Jan 2013 07:41:13 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r0E2BE2o008208 for ; Mon, 14 Jan 2013 13:11:14 +1100 Message-ID: <50F36940.7050709@linux.vnet.ibm.com> Date: Mon, 14 Jan 2013 10:11:12 +0800 From: Wenchao Xia MIME-Version: 1.0 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> In-Reply-To: <20130111181209.5f045b19@doriath.home> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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: Luiz Capitulino Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, chenwj@iis.sinica.edu.tw, armbru@redhat.com 于 2013-1-12 4:12, Luiz Capitulino 写道: > 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(Monitor *mon, >> if (cmd->sub_table != NULL) { >> p1 = 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 and I think this make things clear. I am OK to merge it and drop p1. > Actually, I guess that you could skip the spaces after the > search_dispatch_table() call (using p) and drop p1. But please test it > before doing so :) > > Otherwise series looks good to me. > >> if (*p1 == '\0') { >> return cmd; >> } > -- Best Regards Wenchao Xia