From de5edadee2dca2896492f97ab3a56e389305e74d Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 21 Apr 2015 16:00:41 +0200 Subject: special-case {true,false,test} --help This also removes their help texts. function old new delta run_applet_no_and_exit 442 452 +10 packed_usage 30713 30625 -88 Signed-off-by: Denys Vlasenko --- coreutils/false.c | 8 +++----- coreutils/test.c | 11 +++-------- coreutils/true.c | 8 +++----- 3 files changed, 9 insertions(+), 18 deletions(-) (limited to 'coreutils') diff --git a/coreutils/false.c b/coreutils/false.c index 59c2f32..0591a6c 100644 --- a/coreutils/false.c +++ b/coreutils/false.c @@ -10,11 +10,9 @@ /* BB_AUDIT SUSv3 compliant */ /* http://www.opengroup.org/onlinepubs/000095399/utilities/false.html */ -//usage:#define false_trivial_usage -//usage: "" -//usage:#define false_full_usage "\n\n" -//usage: "Return an exit code of FALSE (1)" -//usage: +/* "false --help" is special-cased to ignore --help */ +//usage:#define false_trivial_usage NOUSAGE_STR +//usage:#define false_full_usage "" //usage:#define false_example_usage //usage: "$ false\n" //usage: "$ echo $?\n" diff --git a/coreutils/test.c b/coreutils/test.c index 88cc550..7b8b10c 100644 --- a/coreutils/test.c +++ b/coreutils/test.c @@ -39,14 +39,9 @@ //config: help //config: Enable 64-bit support in test. -/* "test --help" does not print help (POSIX compat), only "[ --help" does. - * We display " EXPRESSION ]" here (not " EXPRESSION") - * Unfortunately, it screws up generated BusyBox.html. TODO. */ -//usage:#define test_trivial_usage -//usage: "EXPRESSION ]" -//usage:#define test_full_usage "\n\n" -//usage: "Check file types, compare values etc. Return a 0/1 exit code\n" -//usage: "depending on logical value of EXPRESSION" +/* "test --help" is special-cased to ignore --help */ +//usage:#define test_trivial_usage NOUSAGE_STR +//usage:#define test_full_usage "" //usage: //usage:#define test_example_usage //usage: "$ test 1 -eq 2\n" diff --git a/coreutils/true.c b/coreutils/true.c index 382e476..89f8929 100644 --- a/coreutils/true.c +++ b/coreutils/true.c @@ -10,11 +10,9 @@ /* BB_AUDIT SUSv3 compliant */ /* http://www.opengroup.org/onlinepubs/007904975/utilities/true.html */ -//usage:#define true_trivial_usage -//usage: "" -//usage:#define true_full_usage "\n\n" -//usage: "Return an exit code of TRUE (0)" -//usage: +/* "true --help" is special-cased to ignore --help */ +//usage:#define true_trivial_usage NOUSAGE_STR +//usage:#define true_full_usage "" //usage:#define true_example_usage //usage: "$ true\n" //usage: "$ echo $?\n" -- cgit v1.1