From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVIpN-0005j9-Ah for qemu-devel@nongnu.org; Thu, 25 Apr 2013 05:50:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVIpL-0002CX-HC for qemu-devel@nongnu.org; Thu, 25 Apr 2013 05:50:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVIpL-0002CT-5N for qemu-devel@nongnu.org; Thu, 25 Apr 2013 05:50:55 -0400 Date: Thu, 25 Apr 2013 17:50:50 +0800 From: Amos Kong Message-ID: <20130425095050.GA2318@t430s.nay.redhat.com> References: <1366866374-9826-1-git-send-email-akong@redhat.com> <5178C1A0.5090804@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5178C1A0.5090804@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4] monitor: introduce query-command-line-options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Osier Yang Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, lcapitulino@redhat.com On Thu, Apr 25, 2013 at 01:39:44PM +0800, Osier Yang wrote: > On 25/04/13 13:06, Amos Kong wrote: > >Libvirt has no way to probe if an option or property is supported, > >This patch introdues a new qmp command to query command line > >option information. hmp command isn't added because it's not needed. > > > >Signed-off-by: Amos Kong > >CC: Osier Yang > >CC: Anthony Liguori > >--- > >V3: fix jaso schema and comments (Eric) > > s/jaso/json/, > > >V4: fix descriptions, rename command, check enum type, cleanup > >--- > > qapi-schema.json | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++ > > qmp-commands.hx | 48 ++++++++++++++++++++++++++++++++++++++ > > util/qemu-config.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > 3 files changed, 182 insertions(+) ... > >+{'command': 'query-command-line-options', 'data': { '*option': 'str' }, > >+ 'returns': ['CommandLineOptionInfo']} > >diff --git a/qmp-commands.hx b/qmp-commands.hx > >index 4d65422..77fe443 100644 > >--- a/qmp-commands.hx > >+++ b/qmp-commands.hx > >@@ -2416,6 +2416,54 @@ EQMP > > }, > > SQMP > >+query-command-line-options > >+-------------------------- > >+ > >+Show command line option schema. > >+ > >+Return a jaso-array of command line option schema for all options (or for > > s/jaso-array/json-array/, > > >+the given option), returning an error if the given option doesn't exist. > >+ > >+Each array entry contains the following: > >+ > >+- "option": option name (json-string) > >+- "parameters": an array of json-objects, each describing one > >+ parameter of the option: > > To be consistent, s/an array of json-objects/a json-array/, > > How about: > > a json-array describes parameters of the option I will change it to: "parameters": a json-array describes all parameters of the option: > > >+ - "name": parameter name (json-string) > >+ - "type": parameter type (one of 'string', boolean', 'number', > >+ or 'size') > >+ - "help": human readable description of the parameter > >+ (json-string, optional) > >+ > >+ -- Amos.