From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULPO9-0004qk-R2 for qemu-devel@nongnu.org; Thu, 28 Mar 2013 22:49:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULPO8-0005Z8-It for qemu-devel@nongnu.org; Thu, 28 Mar 2013 22:49:57 -0400 Received: from e23smtp04.au.ibm.com ([202.81.31.146]:40151) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULPO8-0005Z2-07 for qemu-devel@nongnu.org; Thu, 28 Mar 2013 22:49:56 -0400 Received: from /spool/local by e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 29 Mar 2013 12:38:59 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id D62AF2BB0023 for ; Fri, 29 Mar 2013 13:49:42 +1100 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r2T2nc611376740 for ; Fri, 29 Mar 2013 13:49:38 +1100 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r2T2ngOT030919 for ; Fri, 29 Mar 2013 13:49:42 +1100 Message-ID: <5155010F.9040305@linux.vnet.ibm.com> Date: Fri, 29 Mar 2013 10:48:47 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1363961953-13561-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1363961953-13561-18-git-send-email-xiawenc@linux.vnet.ibm.com> <20130328110937.GC3077@dhcp-200-207.str.redhat.com> In-Reply-To: <20130328110937.GC3077@dhcp-200-207.str.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH V10 17/17] hmp: add parameter device and -b for info block List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: aliguori@us.ibm.com, stefanha@gmail.com, qemu-devel@nongnu.org, armbru@redhat.com, pbonzini@redhat.com, lcapitulino@redhat.com 于 2013-3-28 19:09, Kevin Wolf 写道: > Am 22.03.2013 um 15:19 hat Wenchao Xia geschrieben: >> With these parameters, user can choose the information to be showed, >> to avoid message flood in the montior. >> >> Signed-off-by: Wenchao Xia > > Aha, so here you actually introduce the 'device' parameter. If you can > have this patch first, and only then patch 16, then limiting the new > output to the form with a device specified should be trivial. > It is a bit indirect that "info block" and "info block " show different on single device, so I introduced additional parameter '-b' to filter out info. With more thinking, I think it should be { .name = "block", .help = "show the block devices", .args_type = "verbose:-v,device:B?", .params = "[-v] [device]", .help = "show info of one block device or all block devices " "and detail of images with -v option", } Then by default "info block" so brief summary as old time. Since the "-v" parameter is filtering something out not present on patch 15, so I can't move this patch forward, hope you are OK with it. >> --- a/monitor.c >> +++ b/monitor.c >> @@ -2455,9 +2455,10 @@ static mon_cmd_t info_cmds[] = { >> }, >> { >> .name = "block", >> - .args_type = "", >> - .params = "", >> - .help = "show the block devices", >> + .args_type = "backing:-b,device:B?", >> + .params = "[-b] [device]", >> + .help = "show info of one block device or all block devices " >> + "[and info of backing images with -b option", > > That '[' doesn't look intentional? my hand shaking... will correct it. > > Kevin > -- Best Regards Wenchao Xia