aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2021-08-16 09:39:05 +0100
committerRon Yorston <rmy@pobox.com>2021-08-16 09:39:05 +0100
commit41f31584037be6b9d74a89245dff9ad8f0db146f (patch)
treeef1c8cbbe18e3eaf7c4dc8284bc19ef6e14f7d78
parent4c08d5f6b53b0ea2fd8d422c02d428ad183d5a9b (diff)
downloadbusybox-w32-41f31584037be6b9d74a89245dff9ad8f0db146f.tar.gz
busybox-w32-41f31584037be6b9d74a89245dff9ad8f0db146f.tar.bz2
busybox-w32-41f31584037be6b9d74a89245dff9ad8f0db146f.zip
busybox: bring help handling into line with upstream
Upstream has fixed a problem with 'busybox --help' so it's possible to remove another gratuitous divergence.
-rw-r--r--libbb/appletlib.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 8f8275831..e1f8bf432 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -1023,12 +1023,12 @@ int busybox_main(int argc UNUSED_PARAM, char **argv)
1023 1023
1024 if (strcmp(argv[1], "--help") == 0) { 1024 if (strcmp(argv[1], "--help") == 0) {
1025 /* "busybox --help [<applet>]" */ 1025 /* "busybox --help [<applet>]" */
1026 if (!argv[2]) 1026 if (!argv[2]
1027 goto help; 1027# if ENABLE_FEATURE_SH_STANDALONE && ENABLE_FEATURE_TAB_COMPLETION
1028#if ENABLE_PLATFORM_MINGW32 1028 || strcmp(argv[2], "busybox") == 0 /* prevent getting "No help available" */
1029 if (strcmp(argv[2], "busybox") == 0) 1029# endif
1030 )
1030 goto help; 1031 goto help;
1031#endif
1032 /* convert to "<applet> --help" */ 1032 /* convert to "<applet> --help" */
1033 applet_name = argv[0] = argv[2]; 1033 applet_name = argv[0] = argv[2];
1034 argv[2] = NULL; 1034 argv[2] = NULL;