From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtV31-0003B5-C2 for qemu-devel@nongnu.org; Thu, 10 Jan 2013 22:12:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TtV2z-0005pC-Hi for qemu-devel@nongnu.org; Thu, 10 Jan 2013 22:12:47 -0500 Received: from e28smtp08.in.ibm.com ([122.248.162.8]:58522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtV2y-0005o6-UW for qemu-devel@nongnu.org; Thu, 10 Jan 2013 22:12:45 -0500 Received: from /spool/local by e28smtp08.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 11 Jan 2013 08:40:58 +0530 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id 640F4E004B for ; Fri, 11 Jan 2013 08:42:54 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r0B3Ca9343516068 for ; Fri, 11 Jan 2013 08:42:37 +0530 Received: from d28av02.in.ibm.com (loopback [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r0B3CcDI029150 for ; Fri, 11 Jan 2013 14:12:38 +1100 Message-ID: <50EF82F0.4090906@linux.vnet.ibm.com> Date: Fri, 11 Jan 2013 11:11:44 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1357806754-8552-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1357806754-8552-3-git-send-email-xiawenc@linux.vnet.ibm.com> <87bocxl4ko.fsf@blackfin.pond.sub.org> In-Reply-To: <87bocxl4ko.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH V4 2/4] HMP: add infrastructure for sub command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, chenwj@iis.sinica.edu.tw, lcapitulino@redhat.com ÓÚ 2013-1-10 18:23, Markus Armbruster дµÀ: > Wenchao Xia writes: > >> This patch make parsing of hmp command aware of that it may >> have sub command. Also discard simple encapsulation function >> monitor_find_command() and qmp_find_cmd(). >> >> Signed-off-by: Wenchao Xia >> --- >> monitor.c | 31 +++++++++++++++++++++++-------- >> 1 files changed, 23 insertions(+), 8 deletions(-) >> >> diff --git a/monitor.c b/monitor.c >> index c7b3014..d49a362 100644 >> --- a/monitor.c >> +++ b/monitor.c >> @@ -130,6 +130,7 @@ typedef struct mon_cmd_t { >> MonitorCompletion *cb, void *opaque); >> } mhandler; >> int flags; >> + struct mon_cmd_t *sub_table; >> } mon_cmd_t; >> >> /* file descriptors passed via SCM_RIGHTS */ > > Forgot to mention: please explain in a comment how mhandler and > sub_table interact. Namely, if there are arguments, we use sub_table, > else mhandler. > OK. -- Best Regards Wenchao Xia