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-w32-8a503be840f2632c96af918ad2ba553b9de49dd9.tar.gz
busybox-w32-8a503be840f2632c96af918ad2ba553b9de49dd9.tar.bz2
busybox-w32-8a503be840f2632c96af918ad2ba553b9de49dd9.zip
#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 @@
7#include "busybox.h" 7#include "busybox.h"
8 8
9const char *applet_name ATTRIBUTE_EXTERNALLY_VISIBLE; 9const char *applet_name ATTRIBUTE_EXTERNALLY_VISIBLE;
10#ifdef BB_NOMMU
10smallint re_execed; 11smallint re_execed;
12#endif
11 13
12#ifdef CONFIG_FEATURE_INSTALLER 14#ifdef CONFIG_FEATURE_INSTALLER
13/* 15/*
@@ -60,11 +62,13 @@ int main(int argc, char **argv)
60{ 62{
61 const char *s; 63 const char *s;
62 64
65#ifdef BB_NOMMU
63 /* NOMMU re-exec trick sets high-order bit in first byte of name */ 66 /* NOMMU re-exec trick sets high-order bit in first byte of name */
64 if (argv[0][0] & 0x80) { 67 if (argv[0][0] & 0x80) {
65 re_execed = 1; 68 re_execed = 1;
66 argv[0][0] &= 0x7f; 69 argv[0][0] &= 0x7f;
67 } 70 }
71#endif
68 72
69 applet_name = argv[0]; 73 applet_name = argv[0];
70 if (*applet_name == '-') 74 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);
617extern void print_login_prompt(void); 617extern void print_login_prompt(void);
618#ifdef BB_NOMMU 618#ifdef BB_NOMMU
619extern void vfork_daemon_rexec(int nochdir, int noclose, char **argv); 619extern void vfork_daemon_rexec(int nochdir, int noclose, char **argv);
620extern smallint re_execed;
620#endif 621#endif
621extern int get_terminal_width_height(const int fd, int *width, int *height); 622extern int get_terminal_width_height(const int fd, int *width, int *height);
622 623
@@ -761,7 +762,6 @@ enum { /* DO NOT CHANGE THESE VALUES! cp.c, mv.c, install.c depend on them. */
761}; 762};
762 763
763#define FILEUTILS_CP_OPTSTR "pdRfils" USE_SELINUX("c") 764#define FILEUTILS_CP_OPTSTR "pdRfils" USE_SELINUX("c")
764extern smallint re_execed;
765extern const char *applet_name; 765extern const char *applet_name;
766extern const char BB_BANNER[]; 766extern const char BB_BANNER[];
767 767