diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-24 12:11:17 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-24 12:11:17 +0000 |
commit | 9067f13be067f39f6c8586926b190b7dee0def3d (patch) | |
tree | ff0a10f5f81fa0e1e719691c147309a9cc9bef46 /applets/busybox.c | |
parent | 1b6fa4c57ced2ae89f51bdc073410c4be5384007 (diff) | |
download | busybox-w32-9067f13be067f39f6c8586926b190b7dee0def3d.tar.gz busybox-w32-9067f13be067f39f6c8586926b190b7dee0def3d.tar.bz2 busybox-w32-9067f13be067f39f6c8586926b190b7dee0def3d.zip |
NOMMU re-exec trick shuld not depend on existence of "don't daemonize"
option for every affected applet (and dnsd, for example, don't have one).
Thus rework re-exec support to not require it. Code got smaller too.
Diffstat (limited to 'applets/busybox.c')
-rw-r--r-- | applets/busybox.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/applets/busybox.c b/applets/busybox.c index 0387d79b7..5334827ca 100644 --- a/applets/busybox.c +++ b/applets/busybox.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "busybox.h" | 7 | #include "busybox.h" |
8 | 8 | ||
9 | const char *applet_name ATTRIBUTE_EXTERNALLY_VISIBLE; | 9 | const char *applet_name ATTRIBUTE_EXTERNALLY_VISIBLE; |
10 | smallint re_execed; | ||
10 | 11 | ||
11 | #ifdef CONFIG_FEATURE_INSTALLER | 12 | #ifdef CONFIG_FEATURE_INSTALLER |
12 | /* | 13 | /* |
@@ -59,6 +60,12 @@ int main(int argc, char **argv) | |||
59 | { | 60 | { |
60 | const char *s; | 61 | const char *s; |
61 | 62 | ||
63 | /* NOMMU re-exec trick sets high-order bit in first byte of name */ | ||
64 | if (argv[0][0] & 0x80) { | ||
65 | re_execed = 1; | ||
66 | argv[0][0] &= 0x7f; | ||
67 | } | ||
68 | |||
62 | applet_name = argv[0]; | 69 | applet_name = argv[0]; |
63 | if (*applet_name == '-') | 70 | if (*applet_name == '-') |
64 | applet_name++; | 71 | applet_name++; |