aboutsummaryrefslogtreecommitdiff
path: root/libbb/appletlib.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2015-05-18 09:36:27 +0100
committerRon Yorston <rmy@pobox.com>2015-05-18 09:36:27 +0100
commit60063627a6d540871061854a362047e6517f821c (patch)
tree0de228630450c64e085f2e3f5141b5ba17eccab3 /libbb/appletlib.c
parentec39cb770ddd5c0e085d5c4ee10be65bab5e7a44 (diff)
parent9a595bb36ded308e6d4336aef2c1cd3ac738a398 (diff)
downloadbusybox-w32-60063627a6d540871061854a362047e6517f821c.tar.gz
busybox-w32-60063627a6d540871061854a362047e6517f821c.tar.bz2
busybox-w32-60063627a6d540871061854a362047e6517f821c.zip
Merge branch 'busybox' into mergeFRP
Diffstat (limited to 'libbb/appletlib.c')
-rw-r--r--libbb/appletlib.c24
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 }