On 03/09/2018 04:07 PM, Thomas Huth wrote:
... but looks like I even got it wrong - it should be "--device e1000",
without "=". Will fix it.
Really? As I understand it, both long-opt spellings work ('--long=opt'
as one arg, and '--long' 'opt' as two args). So the only reason to drop
'=' would be consistency with other examples.
Well, that would be true if we used getopt_long_only(). But we don't
(we stupidly rolled our own command line parser, meaning it has quirks
that are different from everything else that uses the standardized parser).
$ qemu-system-x86_64 --device=e1000
qemu-system-x86_64: --device=e1000: invalid option
Does at least not work for me.
Maybe our QemuOpts parser should be taught to make it work. But that's
orthogonal, so you are right that for now we just always document things
as the two-arg form, since the one-arg form with '=' isn't implemented.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org