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 <lviv...@redhat.com> > --- > 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
signature.asc
Description: OpenPGP digital signature