From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAugx-0005GW-2m for qemu-devel@nongnu.org; Fri, 12 Oct 2018 06:29:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAugs-0001vz-Um for qemu-devel@nongnu.org; Fri, 12 Oct 2018 06:29:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30409) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gAugs-0001vJ-Hv for qemu-devel@nongnu.org; Fri, 12 Oct 2018 06:29:06 -0400 Date: Fri, 12 Oct 2018 11:28:23 +0100 From: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= Message-ID: <20181012102823.GW16720@redhat.com> Reply-To: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= References: <20180914135230.15178-1-marcandre.lureau@redhat.com> <20181011154834.GA10122@redhat.com> <20181012093757.GT16720@redhat.com> <20181012102311.uojhijhdrbaxrjw3@sirius.home.kraxel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20181012102311.uojhijhdrbaxrjw3@sirius.home.kraxel.org> Subject: Re: [Qemu-devel] [PATCH v2] vhost-user: define conventions for vhost-user backends List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , Victor Kaplansky , "Michael S . Tsirkin" , libvir-list@redhat.com, Markus Armbruster , qemu-devel@nongnu.org, "Dr . David Alan Gilbert" , Maxime Coquelin , Gonglei , Felipe Franciosi , Changpeng Liu 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 :|