On Fri, Oct 12, 2018 at 12:23:11PM +0200, Gerd Hoffmann wrote:
>   Hi,
> 
> > Note, I can't remember what Markus had proposed for CLI arguments in
> > QAPI, so I invented something arbitary but plausible.
> 
> Using qapi visitors to parse the command line.  Used by -blockdev and
> -display (and maybe others meanwhile).  See parse_display_qapi().
> 
> I think Daniels suggestion was to do that in the backends ...

More than just that - I was thinking of this series:

   http://lists.gnu.org/archive/html/qemu-devel/2017-10/msg00209.html

In that there is no QemuOpts, or getopt(), etc. You end up using QAPI
for the entire argv parsing procss:

    QAPIOption *qopt;

    qopt = qapi_options_parse(argc, argv);

    for (i = 0; !qopt[i].cnt; i++) {
       switch (qopt[i].type) {
       case QAPI_OPTION_KIND_NODEFCONFIG:
           defconfig = false;
           break;
       case QAPI_OPTION_KIND_NO_USER_CONFIG:
           userconfig = false;
           break;
           ...etc...
    }

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Reply via email to