qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] fix/re-do query-command-line-options
@ 2013-12-23  2:19 Amos Kong
  2014-01-27 10:24 ` [Qemu-devel] [resend] " Amos Kong
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Amos Kong @ 2013-12-23  2:19 UTC (permalink / raw)
  To: qemu-devel, libvir-list
  Cc: Osier Yang, Markus Armbruster, rjones, laine, anthony, pbonzini


Hi QEMU/Libvirt list,

When I worked on query-command-line-options, I first used some marcos [1] to
generate two config & option tables. This will cover all the options,
but it returns a string, it's difficult for libvirt to parse and use
it.

Finally I got a suggestion to read info from new interface (QemuOpts),
We add opts info to vm_config_groups[], query-command-line-options
will visit the array. It doesn't conver all the options, but the
latest options are covered, so this implementation is acceptable.

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

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

If you touched some problem of the query-command-line-options, welcome
to reply it, I will try to satisfy your requests.


Thanks, Amos

[1] http://www.redhat.com/archives/libvir-list/2013-January/msg01656.html


|#elif defined(QEMU_OPTIONS_GENERATE_CONFIG)
|
|#define DEF(option, opt_arg, opt_enum, opt_help, arch_mask)    \
|      opt_help,
|
|#define DEFHEADING(text)
|#define ARCHHEADING(text, arch_mask)
|
|#elif defined(QEMU_OPTIONS_GENERATE_NAME)
|
|#define DEF(option, opt_arg, opt_enum, opt_help, arch_mask)    \
|      option,
|
|#define DEFHEADING(text)
|#define ARCHHEADING(text, arch_mask)

    char const *optionstr[] = {
#define QEMU_OPTIONS_GENERATE_NAME
#include "qemu-options-wrapper.h"
    };

    char const *configstr[] = {
#define QEMU_OPTIONS_GENERATE_CONFIG
#include "qemu-options-wrapper.h"
    };

-- 
			Amos.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-01-28 15:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-23  2:19 [Qemu-devel] fix/re-do query-command-line-options Amos Kong
2014-01-27 10:24 ` [Qemu-devel] [resend] " Amos Kong
2014-01-27 16:27 ` [Qemu-devel] " Eric Blake
2014-01-28  9:36 ` Markus Armbruster
2014-01-28 10:01   ` Paolo Bonzini
2014-01-28 11:55     ` Markus Armbruster
2014-01-28 12:05       ` Paolo Bonzini
2014-01-28 13:16         ` Markus Armbruster
2014-01-28 13:35           ` Paolo Bonzini
2014-01-28 14:28             ` Markus Armbruster
2014-01-28 15:33               ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).