[libvirt] [PATCH v2 18/23] virsh: convert command line parsing to use GOptionContext
Daniel P. Berrangé
berrange at redhat.com
Thu Oct 10 10:00:36 UTC 2019
On Mon, Oct 07, 2019 at 06:14:20PM +0100, Daniel P. Berrangé wrote:
> The GOptionContext API has the benefit over getopt_long that it will
> automatically handle --help output formatting.
>
> Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
> ---
> tools/virsh.c | 304 +++++++++++++++++++++++---------------------------
> 1 file changed, 137 insertions(+), 167 deletions(-)
This patch is broken.
Unfortunately the GOptionContext parsing is not compatible
enough with getopt_long. In particular you can't pass
the value to a short option as a single flag.
ie getopt_long allows '-k0' but GOptionContext requires
to use '-k 0'. This is a backwards incompatible change
so I don't think we can do this conversion.
I might investigate improving GOptionContext, but for now
this & the following patches are dropped.
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 :|
More information about the libvir-list
mailing list