aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-03-24 16:13:33 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-03-24 16:13:33 +0000
commit8a503be840f2632c96af918ad2ba553b9de49dd9 (patch)
tree275c4eb369383b1feedc91fe363e18838f028510
parent769532857560df0cac747a85cdaa31b764cca6c4 (diff)
downloadbusybox-8a503be840f2632c96af918ad2ba553b9de49dd9.tar.gz
#ifdef out re_execed on MMU machines
-rw-r--r--applets/busybox.c4
-rw-r--r--include/libbb.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/applets/busybox.c b/applets/busybox.c
index 5334827ca..47a8b4097 100644
--- a/applets/busybox.c
+++ b/applets/busybox.c
@@ -7,7 +7,9 @@
#include "busybox.h"
const char *applet_name ATTRIBUTE_EXTERNALLY_VISIBLE;
+#ifdef BB_NOMMU
smallint re_execed;
+#endif
#ifdef CONFIG_FEATURE_INSTALLER
/*
@@ -60,11 +62,13 @@ int main(int argc, char **argv)
{
const char *s;
+#ifdef BB_NOMMU
/* NOMMU re-exec trick sets high-order bit in first byte of name */
if (argv[0][0] & 0x80) {
re_execed = 1;
argv[0][0] &= 0x7f;
}
+#endif
applet_name = argv[0];
if (*applet_name == '-')
diff --git a/include/libbb.h b/include/libbb.h
index 0cfc22018..152b87099 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -617,6 +617,7 @@ extern void print_login_issue(const char *issue_file, const char *tty);
extern void print_login_prompt(void);
#ifdef BB_NOMMU
extern void vfork_daemon_rexec(int nochdir, int noclose, char **argv);
+extern smallint re_execed;
#endif
extern int get_terminal_width_height(const int fd, int *width, int *height);
@@ -761,7 +762,6 @@ enum { /* DO NOT CHANGE THESE VALUES! cp.c, mv.c, install.c depend on them. */
};
#define FILEUTILS_CP_OPTSTR "pdRfils" USE_SELINUX("c")
-extern smallint re_execed;
extern const char *applet_name;
extern const char BB_BANNER[];