]> git.ipfire.org Git - thirdparty/util-linux.git/commit
flock, getopt: write --help to stdout and return 0
authorRuediger Meier <ruediger.meier@ga-group.nl>
Sun, 18 Jun 2017 22:02:44 +0000 (00:02 +0200)
committerRuediger Meier <ruediger.meier@ga-group.nl>
Mon, 26 Jun 2017 12:38:24 +0000 (14:38 +0200)
commit6d7bee26bc4f5586b073f9b539453a7499403ea7
tree1a620a48334963f9a25cc021b28d252cb10e71eb
parenta3c29314f1d93e367a204bddf93c2e355a3bd070
flock, getopt: write --help to stdout and return 0

... and use errtryhelp() instead of usage().

Note in past "getopt --help" returned 2. But it is otherwise
documented and was just a mistake IMO. See the unreachable exit(0)
which was removed here: d1d03b54

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
misc-utils/getopt.c
sys-utils/flock.c
tests/expected/getopt/options-compatible
tests/expected/getopt/options-invalid_getopt_option
tests/expected/getopt/options-invocation_without_parameters
tests/expected/getopt/options-no-arguments