From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXx59-0001AL-8I for qemu-devel@nongnu.org; Fri, 04 Sep 2015 15:55:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXx56-0006cN-1o for qemu-devel@nongnu.org; Fri, 04 Sep 2015 15:55:31 -0400 Received: from v220110690675601.yourvserver.net ([37.221.199.173]:55124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXx55-0006by-ST for qemu-devel@nongnu.org; Fri, 04 Sep 2015 15:55:27 -0400 Message-ID: <55E9F72C.9060008@weilnetz.de> Date: Fri, 04 Sep 2015 21:55:24 +0200 From: Stefan Weil MIME-Version: 1.0 References: <1441395005-14907-1-git-send-email-lvivier@redhat.com> <1441395005-14907-2-git-send-email-lvivier@redhat.com> <55E9F40E.4010705@redhat.com> In-Reply-To: <55E9F40E.4010705@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v4 1/3] vl: Add a flags to define parameters with optional arguments. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org, marcandre.lureau@gmail.com Cc: Laurent Vivier Am 04.09.2015 um 21:42 schrieb Eric Blake: > On 09/04/2015 01:30 PM, Laurent Vivier wrote: >> The goal is to be able to use '-help' alone, or with >> a sub-section, i.e. '-help network,usb'. > Uggh. I hate reinventing the wheel. We aren't using getopt_long_only()= ; > but if we were, the ONLY way to specify optional arguments to a long > option is by using the =3D sign, and not by space separation. > > That is, '-help=3Dnetwork,usb' would work, but '-help network,usb' woul= d > NOT be seen as arguments to -help. > > While I'd really rather we just use getopt_long_only(), that's a much > bigger change. But we should at least mirror its semantics, because it= > is VERY confusing to have subtly different command-line behavior than > most apps out there. Wasn't there a plan for a version jump (QEMU v3) with the next release? Then we could really go a step towards getopt_long_only and require options written like --help instead of -help. Today both variants work, so we would have to remove support for the -help form. Stefan