]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Properly handle -h / -V for --help/--version aliases in virtlockd/libvirtd
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 13 Aug 2013 11:14:15 +0000 (12:14 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 13 Aug 2013 13:06:01 +0000 (14:06 +0100)
commit63ba687f2bb78bfe4df96eb3d68bf88f675f562c
treeb3de7f502fc2460f9c7cd957ec2be841f1c96d5f
parenta396473494dd099c2a0e6e03af9a9c7406a86108
Properly handle -h / -V for --help/--version aliases in virtlockd/libvirtd

The virtlockd/libvirtd daemons had listed '?' as the short option
for --help. getopt_long uses '?' for any unknown option. We want
to be able to distinguish unknown options (which use EXIT_FAILURE)
from correct usage of help (which should use EXIT_SUCCESS). Thus
we should use 'h' as a short option for --help. Also add this to
the man page docs

The virtlockd/libvirtd daemons did not list any short option
for the --version arg. Add -V as a valid short option, since
-v is already used for --verbose.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
daemon/libvirtd.c
daemon/libvirtd.pod.in
src/locking/lock_daemon.c
src/locking/virtlockd.pod.in