diff options
Diffstat (limited to 'include/busybox.h')
-rw-r--r-- | include/busybox.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/busybox.h b/include/busybox.h index 39580b548..aef537b2b 100644 --- a/include/busybox.h +++ b/include/busybox.h | |||
@@ -72,7 +72,7 @@ struct BB_applet { | |||
72 | const char* name; | 72 | const char* name; |
73 | int (*main)(int argc, char** argv); | 73 | int (*main)(int argc, char** argv); |
74 | enum Location location; | 74 | enum Location location; |
75 | const char* usage; | 75 | int usage_index; |
76 | }; | 76 | }; |
77 | /* From busybox.c */ | 77 | /* From busybox.c */ |
78 | extern const struct BB_applet applets[]; | 78 | extern const struct BB_applet applets[]; |
@@ -87,9 +87,15 @@ extern const struct BB_applet applets[]; | |||
87 | #include "applets.h" | 87 | #include "applets.h" |
88 | #undef PROTOTYPES | 88 | #undef PROTOTYPES |
89 | 89 | ||
90 | #define APPLET_ENUM | ||
91 | enum APPLET_INDEX_NUMBERS { | ||
92 | #include "applets.h" | ||
93 | }; | ||
94 | #undef APPLET_ENUM | ||
95 | |||
90 | extern const char *applet_name; | 96 | extern const char *applet_name; |
91 | 97 | ||
92 | extern void usage(const char *usage) __attribute__ ((noreturn)); | 98 | extern void show_usage(void) __attribute__ ((noreturn)); |
93 | extern void error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); | 99 | extern void error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); |
94 | extern void error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))); | 100 | extern void error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))); |
95 | extern void perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); | 101 | extern void perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); |
@@ -153,6 +159,7 @@ extern FILE *wfopen(const char *path, const char *mode); | |||
153 | extern FILE *xfopen(const char *path, const char *mode); | 159 | extern FILE *xfopen(const char *path, const char *mode); |
154 | extern void chomp(char *s); | 160 | extern void chomp(char *s); |
155 | extern struct BB_applet *find_applet_by_name(const char *name); | 161 | extern struct BB_applet *find_applet_by_name(const char *name); |
162 | void run_applet_by_name(const char *name, int argc, char **argv); | ||
156 | 163 | ||
157 | #ifndef DMALLOC | 164 | #ifndef DMALLOC |
158 | extern void *xmalloc (size_t size); | 165 | extern void *xmalloc (size_t size); |