aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--applets/applets.c2
-rw-r--r--include/busybox.h2
-rwxr-xr-xscripts/trylink9
3 files changed, 5 insertions, 8 deletions
diff --git a/applets/applets.c b/applets/applets.c
index 49ad8599f..55f8e6b23 100644
--- a/applets/applets.c
+++ b/applets/applets.c
@@ -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 */
diff --git a/include/busybox.h b/include/busybox.h
index 3ab90d5c7..1ab51cf78 100644
--- a/include/busybox.h
+++ b/include/busybox.h
@@ -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_ */
diff --git a/scripts/trylink b/scripts/trylink
index e756461c8..d6538f12e 100755
--- a/scripts/trylink
+++ b/scripts/trylink
@@ -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"