diff options
author | Karel Zak | 2016-12-19 13:13:34 +0100 |
---|---|---|
committer | Karel Zak | 2016-12-19 13:13:34 +0100 |
commit | 677ec86cef983a106c6e5d175f44b125858c3016 (patch) | |
tree | b993641faa65700acd62768da189a103da4c40ec /login-utils/chsh.c | |
parent | include/c.h: add errtryhelp() (diff) | |
download | kernel-qcow2-util-linux-677ec86cef983a106c6e5d175f44b125858c3016.tar.gz kernel-qcow2-util-linux-677ec86cef983a106c6e5d175f44b125858c3016.tar.xz kernel-qcow2-util-linux-677ec86cef983a106c6e5d175f44b125858c3016.zip |
Use --help suggestion on invalid option
The current default is to print all usage() output. This is overkill
in many case.
Addresses: https://github.com/karelzak/util-linux/issues/338
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils/chsh.c')
-rw-r--r-- | login-utils/chsh.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/login-utils/chsh.c b/login-utils/chsh.c index e9e51832d..79fc19d2c 100644 --- a/login-utils/chsh.c +++ b/login-utils/chsh.c @@ -153,7 +153,7 @@ static void parse_argv(int argc, char **argv, struct sinfo *pinfo) pinfo->shell = optarg; break; default: - usage(stderr); + errtryhelp(EXIT_FAILURE); } } /* done parsing arguments. check for a username. */ |