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/pivot_root.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys-utils/pivot_root.c') diff --git a/sys-utils/pivot_root.c b/sys-utils/pivot_root.c index a7b28bf09..acc105621 100644 --- a/sys-utils/pivot_root.c +++ b/sys-utils/pivot_root.c @@ -65,7 +65,7 @@ int main(int argc, char **argv) case 'h': usage(stdout); default: - usage(stderr); + errtryhelp(EXIT_FAILURE); } if (argc != 3) -- cgit v1.2.3-55-g7522