From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7p2C-0007uX-R5 for qemu-devel@nongnu.org; Mon, 27 Jan 2014 11:27:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W7p23-0000aT-Eg for qemu-devel@nongnu.org; Mon, 27 Jan 2014 11:27:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:10045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7p23-0000aN-5o for qemu-devel@nongnu.org; Mon, 27 Jan 2014 11:27:31 -0500 Message-ID: <52E688EE.40905@redhat.com> Date: Mon, 27 Jan 2014 09:27:26 -0700 From: Eric Blake MIME-Version: 1.0 References: <20131223021900.GA17346@amosk.info> In-Reply-To: <20131223021900.GA17346@amosk.info> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="65noXuG6eu1rdqWVMWWpAlLmGiTwMaJsA" Subject: Re: [Qemu-devel] fix/re-do query-command-line-options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong , qemu-devel , libvir-list@redhat.com Cc: Osier Yang , laine@redhat.com, Markus Armbruster , rjones@redhat.com, anthony@codemonkey.ws, pbonzini@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --65noXuG6eu1rdqWVMWWpAlLmGiTwMaJsA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12/22/2013 07:19 PM, Amos Kong wrote: > Problem: > * QemuOpts was designed just for options with parameter, some new optio= n > without parameters is lost in query output (eg: -enable-fips) > * block drive uses three QemuOpts, it's legacy issue. > * QemuOpts of some options aren't updated, it might be difficult to > updated when we add some new parameters > * other Indeed, the existing implementation provides some, but not all, of what libvirt would like to do, so improving it would be welcome. >=20 > We discussed to reimplement this command, but it seems DEF maroc is the= > only point to cover all the options, all the options are described in > qemu-options.hx >=20 > I'm considering to reuse the DEF marocs to generate a table, try to > return the crude info if QemuOpts doesn't cover it. > Or maintain a split array (like vm_config_groups[]), it only contains > the option without parameter (option name & help info). I'll be interested in seeing what happens with that. >=20 > |#elif defined(QEMU_OPTIONS_GENERATE_CONFIG) > | > |#define DEF(option, opt_arg, opt_enum, opt_help, arch_mask) \ Indeed, making use of DEF() to gather more information for use in the query command seems like the right way to pick up all boolean options, in addition to options that take arguments. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --65noXuG6eu1rdqWVMWWpAlLmGiTwMaJsA 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/ iQEcBAEBCAAGBQJS5ojuAAoJEKeha0olJ0NqCL4IAJ/nORf5/i2EbWZD367SevcE xnaUVsZPMtw+Fa+dCbWI06S4Pz1BBogr4VCNK9T5lRqoo6x4eFXZhXbbNghYrD2k r+uvIybxUVXhy807pmfTETrY7ju85Zh2MUQnCRVXIpxc7Fm8S6dzDH5GDlQ2LVpS 3pnMnl3mdJ4GyOi/a3dSQa0FPs0FKMN1RtLd4yPimvwTCNI18TpnqyqSIuLslapC nSC+D/486eeOzJvYelPWKP1F/O1pYbWwbesDqMX+ug39mTXAPJcuUkA22cijWiG9 0e7y6ZpKDiWHsZgndIp82gUM+18rIsnUAnHe77UWhVtOcShCqsHWkca2dOpoTt8= =BnB6 -----END PGP SIGNATURE----- --65noXuG6eu1rdqWVMWWpAlLmGiTwMaJsA--