aboutsummaryrefslogtreecommitdiff
path: root/libbb/appletlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/appletlib.c')
-rw-r--r--libbb/appletlib.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 99f0cb89c..a90d0cdb5 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -319,7 +319,6 @@ void lbb_prepare(const char *applet
319 /* Redundant for busybox (run_applet_and_exit covers that case) 319 /* Redundant for busybox (run_applet_and_exit covers that case)
320 * but needed for "individual applet" mode */ 320 * but needed for "individual applet" mode */
321 if (argv[1] 321 if (argv[1]
322 && !argv[2]
323 && strcmp(argv[1], "--help") == 0 322 && strcmp(argv[1], "--help") == 0
324 && !is_prefixed_with(applet, "busybox") 323 && !is_prefixed_with(applet, "busybox")
325 ) { 324 ) {
@@ -1115,12 +1114,15 @@ void FAST_FUNC show_usage_if_dash_dash_help(int applet_no, char **argv)
1115# if defined APPLET_NO_echo 1114# if defined APPLET_NO_echo
1116 && applet_no != APPLET_NO_echo 1115 && applet_no != APPLET_NO_echo
1117# endif 1116# endif
1117# if ENABLE_TEST1 || ENABLE_TEST2
1118 && argv[0][0] != '[' /* exclude [ --help ] and [[ --help ]] too */
1119# endif
1118# if ENABLE_PLATFORM_MINGW32 && defined APPLET_NO_busybox 1120# if ENABLE_PLATFORM_MINGW32 && defined APPLET_NO_busybox
1119 && applet_no != APPLET_NO_busybox 1121 && applet_no != APPLET_NO_busybox
1120# endif 1122# endif
1121 ) { 1123 ) {
1122 if (argv[1] && !argv[2] && strcmp(argv[1], "--help") == 0) { 1124 if (argv[1] && strcmp(argv[1], "--help") == 0) {
1123 /* Make "foo --help" exit with 0: */ 1125 /* Make "foo --help [...]" exit with 0: */
1124 xfunc_error_retval = 0; 1126 xfunc_error_retval = 0;
1125 bb_show_usage(); 1127 bb_show_usage();
1126 } 1128 }