diff options
author | Ruediger Meier | 2017-06-19 00:02:44 +0200 |
---|---|---|
committer | Ruediger Meier | 2017-06-26 14:38:24 +0200 |
commit | 6d7bee26bc4f5586b073f9b539453a7499403ea7 (patch) | |
tree | 1a620a48334963f9a25cc021b28d252cb10e71eb /tests | |
parent | tools: add checkusage.sh (diff) | |
download | kernel-qcow2-util-linux-6d7bee26bc4f5586b073f9b539453a7499403ea7.tar.gz kernel-qcow2-util-linux-6d7bee26bc4f5586b073f9b539453a7499403ea7.tar.xz kernel-qcow2-util-linux-6d7bee26bc4f5586b073f9b539453a7499403ea7.zip |
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>
Diffstat (limited to 'tests')
4 files changed, 4 insertions, 4 deletions
diff --git a/tests/expected/getopt/options-compatible b/tests/expected/getopt/options-compatible index 585de608a..66e42a7b5 100644 --- a/tests/expected/getopt/options-compatible +++ b/tests/expected/getopt/options-compatible @@ -1,5 +1,5 @@ getopt: missing optstring argument -Try `getopt --help' for more information. +Try 'getopt --help' for more information. exit value: 2 -- exit value: 0 diff --git a/tests/expected/getopt/options-invalid_getopt_option b/tests/expected/getopt/options-invalid_getopt_option index 531cc9828..b3577e027 100644 --- a/tests/expected/getopt/options-invalid_getopt_option +++ b/tests/expected/getopt/options-invalid_getopt_option @@ -1,3 +1,3 @@ getopt: invalid option -- 'b' -Try `getopt --help' for more information. +Try 'getopt --help' for more information. exit value: 2 diff --git a/tests/expected/getopt/options-invocation_without_parameters b/tests/expected/getopt/options-invocation_without_parameters index 08b3ed5cf..f1ecc1610 100644 --- a/tests/expected/getopt/options-invocation_without_parameters +++ b/tests/expected/getopt/options-invocation_without_parameters @@ -1,3 +1,3 @@ getopt: missing optstring argument -Try `getopt --help' for more information. +Try 'getopt --help' for more information. exit value: 2 diff --git a/tests/expected/getopt/options-no-arguments b/tests/expected/getopt/options-no-arguments index 08b3ed5cf..f1ecc1610 100644 --- a/tests/expected/getopt/options-no-arguments +++ b/tests/expected/getopt/options-no-arguments @@ -1,3 +1,3 @@ getopt: missing optstring argument -Try `getopt --help' for more information. +Try 'getopt --help' for more information. exit value: 2 |