Make 'busybox --help' work as expected, closing bug #1139
authorEric Andersen <andersen@codepoet.org>
Tue, 3 Apr 2001 17:05:01 +0000 (17:05 -0000)
committerEric Andersen <andersen@codepoet.org>
Tue, 3 Apr 2001 17:05:01 +0000 (17:05 -0000)
 -Erik

applets.c
applets/applets.c
applets/busybox.c
busybox.c

index c2ccb88faf05795402f230046f82bcdc8d602bbd..10b44a5fc7250a930869e685df13bf31e5daed4e 100644 (file)
--- a/applets.c
+++ b/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++) {
index c2ccb88faf05795402f230046f82bcdc8d602bbd..10b44a5fc7250a930869e685df13bf31e5daed4e 100644 (file)
@@ -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++) {
index 03a2525a3eb9337ca4c6f4e1ccb994b4baea0ebd..5085556d6b55915b8557b608482fc807874b2793 100644 (file)
@@ -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
index 03a2525a3eb9337ca4c6f4e1ccb994b4baea0ebd..5085556d6b55915b8557b608482fc807874b2793 100644 (file)
--- a/busybox.c
+++ b/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