qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 1/3] vl: Add a flags to define parameters wit


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v4 1/3] vl: Add a flags to define parameters with optional arguments.
Date: Fri, 4 Sep 2015 13:42:06 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

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 = sign, and not by space separation.

That is, '-help=network,usb' would work, but '-help network,usb' would
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.

> 
> Signed-off-by: Laurent Vivier <address@hidden>
> ---
>  vl.c | 20 +++++++++++++++-----
>  1 file changed, 15 insertions(+), 5 deletions(-)
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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