summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authorEric Andersen2001-04-03 17:05:01 +0000
committerEric Andersen2001-04-03 17:05:01 +0000
commit0f0c0b41ced8c30d382a0490719c79371260b9d1 (patch)
treed37977c030439aba3b3dd6b55c33136f8e828542 /applets
parentc0c502e172833db872e9760e96dab55244537100 (diff)
downloadbusybox-0f0c0b41ced8c30d382a0490719c79371260b9d1.zip
busybox-0f0c0b41ced8c30d382a0490719c79371260b9d1.tar.gz
Make 'busybox --help' work as expected, closing bug #1139
-Erik
Diffstat (limited to 'applets')
-rw-r--r--applets/applets.c7
-rw-r--r--applets/busybox.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/applets/applets.c b/applets/applets.c
index c2ccb88..10b44a5 100644
--- a/applets/applets.c
+++ b/applets/applets.c
@@ -49,6 +49,13 @@ extern void show_usage(void)
const char *format_string;
const char *usage_string = usage_messages;
int i;
+ /* From busybox.c */
+ extern int been_there_done_that;
+
+ if (strcmp(applet_using->name, "busybox")==0) {
+ been_there_done_that=1;
+ busybox_main(0, NULL);
+ }
for (i = applet_using - applets; i > 0; ) {
if (!*usage_string++) {
diff --git a/applets/busybox.c b/applets/busybox.c
index 03a2525..5085556 100644
--- a/applets/busybox.c
+++ b/applets/busybox.c
@@ -10,7 +10,7 @@
#define BB_DECLARE_EXTERN
#include "messages.c"
-static int been_there_done_that = 0;
+int been_there_done_that = 0; /* Also used in applets.c */
const char *applet_name;
#ifdef BB_FEATURE_INSTALLER