diff options
Diffstat (limited to 'libbb/appletlib.c')
| -rw-r--r-- | libbb/appletlib.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 3f51ecef6..683d10b20 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c | |||
| @@ -635,7 +635,7 @@ static int busybox_main(char **argv) | |||
| 635 | full_write2_str(bb_banner); /* reuse const string */ | 635 | full_write2_str(bb_banner); /* reuse const string */ |
| 636 | full_write2_str(" multi-call binary.\n"); /* reuse */ | 636 | full_write2_str(" multi-call binary.\n"); /* reuse */ |
| 637 | full_write2_str( | 637 | full_write2_str( |
| 638 | "BusyBox is copyrighted by many authors between 1998-2012.\n" | 638 | "BusyBox is copyrighted by many authors between 1998-2015.\n" |
| 639 | "Licensed under GPLv2. See source distribution for detailed\n" | 639 | "Licensed under GPLv2. See source distribution for detailed\n" |
| 640 | "copyright notices.\n" | 640 | "copyright notices.\n" |
| 641 | "\n" | 641 | "\n" |
| @@ -761,23 +761,25 @@ void FAST_FUNC run_applet_no_and_exit(int applet_no, char **argv) | |||
| 761 | xfunc_error_retval = EXIT_FAILURE; | 761 | xfunc_error_retval = EXIT_FAILURE; |
| 762 | applet_name = APPLET_NAME(applet_no); | 762 | applet_name = APPLET_NAME(applet_no); |
| 763 | 763 | ||
| 764 | #if defined APPLET_NO_test | ||
| 765 | /* Special case. POSIX says "test --help" | 764 | /* Special case. POSIX says "test --help" |
| 766 | * should be no different from e.g. "test --foo". | 765 | * should be no different from e.g. "test --foo". |
| 767 | * Thus for "test", we skip --help check. | 766 | * Thus for "test", we skip --help check. |
| 767 | * "true" and "false" are also special. | ||
| 768 | */ | 768 | */ |
| 769 | if (applet_no != APPLET_NO_test) | 769 | if (1 |
| 770 | #if defined APPLET_NO_test | ||
| 771 | && applet_no != APPLET_NO_test | ||
| 772 | #endif | ||
| 773 | #if defined APPLET_NO_true | ||
| 774 | && applet_no != APPLET_NO_true | ||
| 770 | #endif | 775 | #endif |
| 771 | { | ||
| 772 | if (argc == 2 && strcmp(argv[1], "--help") == 0) { | ||
| 773 | #if defined APPLET_NO_false | 776 | #if defined APPLET_NO_false |
| 774 | /* Someone insisted that "false --help" must exit 1. Sigh */ | 777 | && applet_no != APPLET_NO_false |
| 775 | if (applet_no != APPLET_NO_false) | ||
| 776 | #endif | 778 | #endif |
| 777 | { | 779 | ) { |
| 778 | /* Make "foo --help" exit with 0: */ | 780 | if (argc == 2 && strcmp(argv[1], "--help") == 0) { |
| 779 | xfunc_error_retval = 0; | 781 | /* Make "foo --help" exit with 0: */ |
| 780 | } | 782 | xfunc_error_retval = 0; |
| 781 | bb_show_usage(); | 783 | bb_show_usage(); |
| 782 | } | 784 | } |
| 783 | } | 785 | } |
