From d06c58df5c723594c4f214dd5d1842a178d2a5e1 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 11 Oct 2007 15:36:36 -0500 Subject: Promote help to global config option, teach error_exit() to output usage message when called from get_optflags(). --- toys/Config.in | 16 ---------------- toys/help.c | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) (limited to 'toys') diff --git a/toys/Config.in b/toys/Config.in index 8c3017cd..e0454229 100644 --- a/toys/Config.in +++ b/toys/Config.in @@ -101,22 +101,6 @@ config HELLO help A hello world program. You don't need this. -config HELP - bool "help" - default y - help - usage: help [command] - - Show usage information for toybox commands. - -config HELP_LONG - bool "Verbose help text" - default y - depends on HELP - help - Show more than one line of help information per command. - - config MDEV bool "mdev" default n diff --git a/toys/help.c b/toys/help.c index 6af743fc..4687d0ec 100644 --- a/toys/help.c +++ b/toys/help.c @@ -28,6 +28,6 @@ int help_main(void) s = help_data; } - printf("%s", s); + fprintf(toys.exithelp ? stderr : stdout, "%s", s); return 0; } -- cgit v1.2.3