On 01/04/2015 10:42, Markus Armbruster wrote:
The obvious way to return them is to put them right back in
qemu_machine_opts.desc[]. But then -machine rejects machine-specific
parameters.
Hack: monkey-patch them in after we're done parsing.
Cleaner: "empty desc[] means accept anything" has always been overly
restrictive. Have a flag "accept additional parameters".
We may have to do the former for 2.3, but that's no excuse not to
replace it by something less gross in 2.4.
The latter sounds less intrusive, actually. Could it be as easy as
static bool opts_accepts_any(const QemuOpts *opts)
{
- return opts->list->desc[0].name == NULL;
+ return opts->list->desc[0].name == NULL || opts->list->accept_any;
}
?