qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] vhost-user: define conventions for vhost-use


From: Daniel P . Berrangé
Subject: Re: [Qemu-devel] [PATCH v2] vhost-user: define conventions for vhost-user backends
Date: Fri, 12 Oct 2018 11:28:23 +0100
User-agent: Mutt/1.10.1 (2018-07-13)

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

[Prev in Thread] Current Thread [Next in Thread]