diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-10-11 10:06:26 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-10-11 10:06:26 +0000 |
commit | 15cb4a42724e480734157a55921ba435ed1413fc (patch) | |
tree | 81648e3f71bad18e88e19cb8efe094a10d94ab15 /libbb | |
parent | 9b49a5ed8551e46892af3f676e5d96d21b540e3c (diff) | |
download | busybox-w32-15cb4a42724e480734157a55921ba435ed1413fc.tar.gz busybox-w32-15cb4a42724e480734157a55921ba435ed1413fc.tar.bz2 busybox-w32-15cb4a42724e480734157a55921ba435ed1413fc.zip |
fix a problem with two different applet_name's
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/appletlib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 953f1e7e5..8b1ed8000 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c | |||
@@ -127,11 +127,12 @@ const struct bb_applet *find_applet_by_name(const char *name) | |||
127 | int *const bb_errno __attribute__ ((section (".data"))); | 127 | int *const bb_errno __attribute__ ((section (".data"))); |
128 | #endif | 128 | #endif |
129 | 129 | ||
130 | void lbb_prepare(char **argv) | 130 | void lbb_prepare(const char *applet, char **argv) |
131 | { | 131 | { |
132 | #ifdef __GLIBC__ | 132 | #ifdef __GLIBC__ |
133 | (*(int **)&bb_errno) = __errno_location(); | 133 | (*(int **)&bb_errno) = __errno_location(); |
134 | #endif | 134 | #endif |
135 | applet_name = applet; | ||
135 | 136 | ||
136 | /* Set locale for everybody except 'init' */ | 137 | /* Set locale for everybody except 'init' */ |
137 | if (ENABLE_LOCALE_SUPPORT && getpid() != 1) | 138 | if (ENABLE_LOCALE_SUPPORT && getpid() != 1) |
@@ -666,7 +667,7 @@ int lbb_main(int argc, char **argv) | |||
666 | int main(int argc, char **argv) | 667 | int main(int argc, char **argv) |
667 | #endif | 668 | #endif |
668 | { | 669 | { |
669 | lbb_prepare(argv); | 670 | lbb_prepare("busybox", argv); |
670 | 671 | ||
671 | #if !BB_MMU | 672 | #if !BB_MMU |
672 | /* NOMMU re-exec trick sets high-order bit in first byte of name */ | 673 | /* NOMMU re-exec trick sets high-order bit in first byte of name */ |