From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNXfm-0003zX-SK for qemu-devel@nongnu.org; Tue, 11 Mar 2014 21:09:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNXfg-0004x5-4L for qemu-devel@nongnu.org; Tue, 11 Mar 2014 21:09:30 -0400 Received: from qmta14.emeryville.ca.mail.comcast.net ([76.96.27.212]:40254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNXff-0004wq-Pu for qemu-devel@nongnu.org; Tue, 11 Mar 2014 21:09:24 -0400 Message-ID: <531FAE52.8010708@redhat.com> Date: Tue, 11 Mar 2014 18:46:10 -0600 From: Eric Blake MIME-Version: 1.0 References: <1394172567-19634-1-git-send-email-akong@redhat.com> <1394172567-19634-3-git-send-email-akong@redhat.com> In-Reply-To: <1394172567-19634-3-git-send-email-akong@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="K8gA84EQNqo2vvlFDCwRorh5sBlJDb0tU" Subject: Re: [Qemu-devel] [PATCH v5 2/2] query-command-line-options: query all the options in qemu-options.hx List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong , qemu-devel@nongnu.org Cc: armbru@redhat.com, pbonzini@redhat.com, libvirt-list@redhat.com, jyang@redhat.com, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --K8gA84EQNqo2vvlFDCwRorh5sBlJDb0tU Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/06/2014 11:09 PM, Amos Kong wrote: > vm_config_groups[] only contains part of the options which have > parameters, and all options which have no parameter aren't added > to vm_config_groups[]. Current query-command-line-options only > checks options from vm_config_groups[], so some options will > be lost. >=20 > We have macro in qemu-options.hx to generate a table that > contains all the options. This patch tries to query options > from the table. >=20 > Then we won't lose the legacy options that weren't added to > vm_config_groups[] (eg: -vnc, -smbios). The options that have > no parameter will also be returned (eg: -enable-fips) >=20 > Some options that have parameters have a NULL desc list, some > options don't have parameters, and "parameters" is mandatory > in the past. So we add a new field "unspecified-parameters" to > present if the option takes unspecified parameters. >=20 > This patch also fixes options to match their actual command-line > spelling rather than an alternate name associated with the > option table in use by the command. >=20 > Signed-off-by: Amos Kong > --- > qapi-schema.json | 9 +++++++-- > qemu-options.h | 12 ++++++++++++ > util/qemu-config.c | 43 ++++++++++++++++++++++++++++++++++++------- > vl.c | 19 ++----------------- > 4 files changed, 57 insertions(+), 26 deletions(-) Based on the thread on v4, it sounds like this design is still not finalized, and won't make 2.0. It sounds like once we start exposing all options, it would also be nice to show which options are sugar for other spellings. >=20 > diff --git a/qapi-schema.json b/qapi-schema.json > index 193e7e4..fb7ca1b 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -4070,12 +4070,17 @@ > # > # @option: option name > # > -# @parameters: an array of @CommandLineParameterInfo > +# @parameters: array of @CommandLineParameterInfo, possibly empty > +# @unspecified-parameters: @optional present if the @parameters array = is empty. Blank lines between the two parameters, for consistency. > +# If true, then the option takes unspecified > +# parameters, if false, then the option takes= no > +# parameter (since 2.0) So this will need to be changed to '(since 2.1)'. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --K8gA84EQNqo2vvlFDCwRorh5sBlJDb0tU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTH65SAAoJEKeha0olJ0NqMmYH/0oMBIlK4lDV168d8cQRZC5M zDA4Nz9Jy7vTQISYwLACSzuA2d7x2hh6EXsnbHRkZOy3cyCGWUni8tAufBFxv5MQ FGERfrNIZc2c1if3ji0h/pRUms5mDouLGw4pyo9T/0brHHCPqap6ImQPYuJ3t9Rb j0Ibee0bp2diY+DS9cN6IyCk3A5I22rOUCH9gH+NHM32j0djEd7y+YDgJaEisuqb GmgMjlz3447WioCu+LB9GYtECDdmgM8DTksOzJ+5YE4qDfwsSyi4HCcubH/9n4rn tHpzy/GYRhgBsGpCNe0n5zKciFBuBjL6ZPT0jJlyTe1X+6zFI6qIzY7uXZ2dHzI= =t9Up -----END PGP SIGNATURE----- --K8gA84EQNqo2vvlFDCwRorh5sBlJDb0tU--