make --help work for "individual applets" too.

This commit is contained in:
Denis Vlasenko 2007-10-07 21:00:41 +00:00
parent d62fd84d4b
commit 642a52d65e
3 changed files with 5 additions and 8 deletions

View File

@ -538,7 +538,7 @@ void run_applet_and_exit(const char *name, char **argv)
int main(int argc, char **argv)
{
bbox_prepare_main();
bbox_prepare_main(argv);
#if !BB_MMU
/* NOMMU re-exec trick sets high-order bit in first byte of name */

View File

@ -51,6 +51,6 @@ struct bb_applet {
/* Defined in appletlib.c */
extern const struct bb_applet applets[];
extern const unsigned short NUM_APPLETS;
void bbox_prepare_main(void);
void bbox_prepare_main(char **argv);
#endif /* _BB_INTERNAL_H_ */

View File

@ -155,20 +155,17 @@ if test "$CONFIG_FEATURE_INDIVIDUAL" = y; then
| grep -v "^#" \
| grep -v "^$" \
> applet.lst
while read name main cname; do
test x"$cname" = "x[" && cname=test
test x"$cname" = "x[[" && cname=test
while read name main junk; do
echo "\
void bbox_prepare_main(void);
void bbox_prepare_main(char **argv);
int $main(int argc, char **argv);
const char *applet_name = \"$name\";
int main(int argc, char **argv)
{
bbox_prepare_main();
bbox_prepare_main(argv);
return $main(argc, argv);
}
" >"$sharedlib_dir/applet.c"