From 677ec86cef983a106c6e5d175f44b125858c3016 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 19 Dec 2016 13:13:34 +0100 Subject: 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 --- sys-utils/eject.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sys-utils/eject.c') diff --git a/sys-utils/eject.c b/sys-utils/eject.c index 008b4fe4e..7bc68555a 100644 --- a/sys-utils/eject.c +++ b/sys-utils/eject.c @@ -268,8 +268,7 @@ static void parse_args(struct eject_control *ctl, int argc, char **argv) exit(EXIT_SUCCESS); break; default: - case '?': - usage(stderr); + errtryhelp(EXIT_FAILURE); break; } } -- cgit v1.2.3-55-g7522