Make 'busybox --help' work as expected, closing bug #1139

-Erik
This commit is contained in:
Eric Andersen 2001-04-03 17:05:01 +00:00
parent c0c502e172
commit 0f0c0b41ce
4 changed files with 16 additions and 2 deletions

View File

@ -49,6 +49,13 @@ extern void show_usage(void)
const char *format_string; const char *format_string;
const char *usage_string = usage_messages; const char *usage_string = usage_messages;
int i; 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; ) { for (i = applet_using - applets; i > 0; ) {
if (!*usage_string++) { if (!*usage_string++) {

View File

@ -49,6 +49,13 @@ extern void show_usage(void)
const char *format_string; const char *format_string;
const char *usage_string = usage_messages; const char *usage_string = usage_messages;
int i; 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; ) { for (i = applet_using - applets; i > 0; ) {
if (!*usage_string++) { if (!*usage_string++) {

View File

@ -10,7 +10,7 @@
#define BB_DECLARE_EXTERN #define BB_DECLARE_EXTERN
#include "messages.c" #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; const char *applet_name;
#ifdef BB_FEATURE_INSTALLER #ifdef BB_FEATURE_INSTALLER

View File

@ -10,7 +10,7 @@
#define BB_DECLARE_EXTERN #define BB_DECLARE_EXTERN
#include "messages.c" #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; const char *applet_name;
#ifdef BB_FEATURE_INSTALLER #ifdef BB_FEATURE_INSTALLER