[libvirt] fix/re-do query-command-line-options

Eric Blake eblake at redhat.com
Mon Jan 27 16:27:26 UTC 2014


On 12/22/2013 07:19 PM, Amos Kong wrote:

> Problem:
> * QemuOpts was designed just for options with parameter, some new option
>   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.

> 
> 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
> 
> 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.

> 
> |#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.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140127/fb8d5c89/attachment-0001.sig>


More information about the libvir-list mailing list