aboutsummaryrefslogtreecommitdiff
path: root/libbb/appletlib.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2022-10-12 10:43:26 +0100
committerRon Yorston <rmy@pobox.com>2022-10-12 10:43:26 +0100
commit49c6f079acb4edae84b4496bd941cdbb5048ba01 (patch)
treeac54ecaad45050f7bfe274a11db29882aa32a9a8 /libbb/appletlib.c
parenta55cf07365ec2ff51749a77e09ae9edac79a99fe (diff)
parentc8c1fcdba163f264a503380bc63485aacd09214c (diff)
downloadbusybox-w32-49c6f079acb4edae84b4496bd941cdbb5048ba01.tar.gz
busybox-w32-49c6f079acb4edae84b4496bd941cdbb5048ba01.tar.bz2
busybox-w32-49c6f079acb4edae84b4496bd941cdbb5048ba01.zip
Merge branch 'busybox' into merge
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 }