From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57221) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TudDj-000062-BR for qemu-devel@nongnu.org; Mon, 14 Jan 2013 01:08:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TudDf-0000zt-Fe for qemu-devel@nongnu.org; Mon, 14 Jan 2013 01:08:31 -0500 Received: from e23smtp09.au.ibm.com ([202.81.31.142]:55082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TudDe-0000zn-UF for qemu-devel@nongnu.org; Mon, 14 Jan 2013 01:08:27 -0500 Received: from /spool/local by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 14 Jan 2013 16:02:28 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 02A412BB0050 for ; Mon, 14 Jan 2013 17:08:21 +1100 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r0E68IeU13762568 for ; Mon, 14 Jan 2013 17:08:20 +1100 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r0E68IbA021262 for ; Mon, 14 Jan 2013 17:08:18 +1100 From: Wenchao Xia Date: Mon, 14 Jan 2013 14:06:24 +0800 Message-Id: <1358143589-5913-1-git-send-email-xiawenc@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH V6 0/5] HMP: allow parsing for sub command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Wenchao Xia , aliguori@us.ibm.com, armbru@redhat.com, chenwj@iis.sinica.edu.tw, lcapitulino@redhat.com These patches enhance HMP to allow it parse 2nd level of commands, such as info sub command list, which means foldered command with parameter is possible now. V2: Follow the way supposed by Markus, which make the infrastructure knows there is possible a 2nd level of command exist, instead of a hack. In this way extention of command folder level is easy. Moved function declaration and better doc according to comments. Removed the patch about info snapshots, which will goto another serial. V3: Split out code moving patch. V4: Removed change of qmp_find_cmd(). Removed name change of monitor_parse_command(). v5: Eliminate 'info' in mhandler for that it have same format with 'cmd' and info is not a special case but a sub-command now. Split out patch that checking for space before check for sub-command. Better comments for monitor_parse_command(). Add parameter start for better error tips in sub-command case. Add comments about how sub_table and mhandler interact. Better commit message and tips that "info " show error now. v6: Filter out space before checking of sub command in montior_parse_command(), and discard *p1 in it. Merged patch "filter out space" into "infrastructure" patch. Wenchao Xia (5): HMP: add QDict to info callback handler HMP: delete info handler HMP: add infrastructure for sub command HMP: move define of mon_cmds HMP: add sub command table to info hmp-commands.hx | 3 +- hmp.c | 36 ++++---- hmp.h | 36 ++++---- hw/i8259.c | 4 +- hw/lm32_pic.c | 4 +- hw/lm32_pic.h | 4 +- hw/loader.c | 2 +- hw/loader.h | 3 +- hw/pc.h | 4 +- hw/pcmcia.h | 2 +- hw/qdev-monitor.c | 4 +- hw/qdev-monitor.h | 4 +- hw/sun4m.c | 4 +- hw/sun4m.h | 4 +- hw/usb.h | 2 +- hw/usb/bus.c | 2 +- hw/usb/host-bsd.c | 2 +- hw/usb/host-linux.c | 2 +- include/net/net.h | 2 +- include/net/slirp.h | 2 +- include/sysemu/sysemu.h | 4 +- monitor.c | 200 ++++++++++++++++++++++++---------------------- net/net.c | 2 +- net/slirp.c | 2 +- savevm.c | 2 +- vl.c | 2 +- 26 files changed, 174 insertions(+), 164 deletions(-)