make --help work for "individual applets" too.
This commit is contained in:
parent
d62fd84d4b
commit
642a52d65e
@ -538,7 +538,7 @@ void run_applet_and_exit(const char *name, char **argv)
|
|||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
bbox_prepare_main();
|
bbox_prepare_main(argv);
|
||||||
|
|
||||||
#if !BB_MMU
|
#if !BB_MMU
|
||||||
/* NOMMU re-exec trick sets high-order bit in first byte of name */
|
/* NOMMU re-exec trick sets high-order bit in first byte of name */
|
||||||
|
@ -51,6 +51,6 @@ struct bb_applet {
|
|||||||
/* Defined in appletlib.c */
|
/* Defined in appletlib.c */
|
||||||
extern const struct bb_applet applets[];
|
extern const struct bb_applet applets[];
|
||||||
extern const unsigned short NUM_APPLETS;
|
extern const unsigned short NUM_APPLETS;
|
||||||
void bbox_prepare_main(void);
|
void bbox_prepare_main(char **argv);
|
||||||
|
|
||||||
#endif /* _BB_INTERNAL_H_ */
|
#endif /* _BB_INTERNAL_H_ */
|
||||||
|
@ -155,20 +155,17 @@ if test "$CONFIG_FEATURE_INDIVIDUAL" = y; then
|
|||||||
| grep -v "^#" \
|
| grep -v "^#" \
|
||||||
| grep -v "^$" \
|
| grep -v "^$" \
|
||||||
> applet.lst
|
> applet.lst
|
||||||
while read name main cname; do
|
while read name main junk; do
|
||||||
|
|
||||||
test x"$cname" = "x[" && cname=test
|
|
||||||
test x"$cname" = "x[[" && cname=test
|
|
||||||
|
|
||||||
echo "\
|
echo "\
|
||||||
void bbox_prepare_main(void);
|
void bbox_prepare_main(char **argv);
|
||||||
int $main(int argc, char **argv);
|
int $main(int argc, char **argv);
|
||||||
|
|
||||||
const char *applet_name = \"$name\";
|
const char *applet_name = \"$name\";
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
bbox_prepare_main();
|
bbox_prepare_main(argv);
|
||||||
return $main(argc, argv);
|
return $main(argc, argv);
|
||||||
}
|
}
|
||||||
" >"$sharedlib_dir/applet.c"
|
" >"$sharedlib_dir/applet.c"
|
||||||
|
Loading…
Reference in New Issue
Block a user