From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLflD-0005Bi-Nf for qemu-devel@nongnu.org; Thu, 06 Mar 2014 16:23:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLfl8-000427-F2 for qemu-devel@nongnu.org; Thu, 06 Mar 2014 16:23:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLfl8-000423-6X for qemu-devel@nongnu.org; Thu, 06 Mar 2014 16:23:18 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s26LNG2d006991 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 6 Mar 2014 16:23:17 -0500 Message-ID: <5318E743.7070609@redhat.com> Date: Thu, 06 Mar 2014 14:23:15 -0700 From: Eric Blake MIME-Version: 1.0 References: <1394073416-12578-1-git-send-email-akong@redhat.com> <1394073416-12578-3-git-send-email-akong@redhat.com> In-Reply-To: <1394073416-12578-3-git-send-email-akong@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BGSeqrrsaNX0lv7bePFSONojiqAW9TJql" Subject: Re: [Qemu-devel] [PATCH v4 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) --BGSeqrrsaNX0lv7bePFSONojiqAW9TJql Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/05/2014 07:36 PM, Amos Kong wrote: > vm_config_groups[] only contains part of the options which have > argument, and all options which have no argument 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 argument will also be returned (eg: -enable-fips) >=20 > Some options that have argument have a NULL desc list, some > options don't have argument, and "parameters" is mandatory > in the past. So we add a new field "argument" to present > if the option takes unspecified arguments. I like Markus' suggestion of naming the new field 'unspecified-parameters' rather than 'argument'. >=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. Should we independently patch hw/acpi/core.c to rename qemu_acpi_opts from "acpi" to "acpitable" to match the command line option? Same for vl.c and qemu_boot_opts from "boot-opts" to "boot"? Same for vl.c and qemu_smp_opts from "smp-opts" to "smp"? Those were the obvious mismatches I found where the command line was spelled differently than the vm_config_groups entry. This is a bug fix patch, so let's shoot to get it into 2.0. >=20 > Signed-off-by: Amos Kong > --- > qapi-schema.json | 8 ++++++-- > qemu-options.h | 10 ++++++++++ > util/qemu-config.c | 44 ++++++++++++++++++++++++++++++++++++++------ > vl.c | 15 --------------- > 4 files changed, 54 insertions(+), 23 deletions(-) >=20 > +++ b/util/qemu-config.c > @@ -6,6 +6,16 @@ > #include "hw/qdev.h" > #include "qapi/error.h" > #include "qmp-commands.h" > +#include "qemu-options.h" > + > +#define HAS_ARG 0x0001 Hmm, we are now duplicating this macro between here and vl.c. I'd prefer it gets hoisted into the .h file, so that it doesn't get out of sync between the two clients. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --BGSeqrrsaNX0lv7bePFSONojiqAW9TJql 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/ iQEcBAEBCAAGBQJTGOdDAAoJEKeha0olJ0NqHVsH/1puwAKszbFwcxzs8k70iDQB edpLx8LA8Uoqm1m/j0XR4fcHU+dbr+nLqr5z6sCyDXXMrIE4vljOoJPfcqpbWprP MAhMqeNf3SigKE88zbg5qLDca7m3k6Rb6C9j6VJ68+BVCeB2zD3x/8x3KO8Jw7Jv 1EDkd8Mkgn83CBK23O8eejkA+wL6orQv+57pwU3ogNXEMOkjDhAIbF9bvBib/vgK E7OELwd4p6SkZAly05YVcAa5RoQboHChcSnIb0nY3iQM2kfY5dreck7ZX/cwFSAJ 6467ibdU25Z0hCVvkJt1+EQyfkIV0Vg486ccuvHKRsmBXyWaP0Z4EDJZ/TGNXRk= =hcoU -----END PGP SIGNATURE----- --BGSeqrrsaNX0lv7bePFSONojiqAW9TJql--