[BusyBox 0001286]: "re_execed" only used on NOMMU CPU

bugs at busybox.net bugs at busybox.net
Sat Mar 24 14:36:47 UTC 2007


The following issue has been SUBMITTED. 
====================================================================== 
http://busybox.net/bugs/view.php?id=1286 
====================================================================== 
Reported By:                rockeychu
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   1286
Category:                   Other
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             03-24-2007 07:36 PDT
Last Modified:              03-24-2007 07:36 PDT
====================================================================== 
Summary:                    "re_execed" only used on NOMMU CPU
Description: 
"re_execed" only used on NOMMU CPU, so it should be depended on BB_NOMMU.

Patches as following:

Index: include/libbb.h
===================================================================
--- include/libbb.h     (revision 18224)
+++ include/libbb.h     (working copy)
@@ -616,6 +616,7 @@
 extern void print_login_issue(const char *issue_file, const char *tty);
 extern void print_login_prompt(void);
 #ifdef BB_NOMMU
+extern smallint re_execed;
 extern void vfork_daemon_rexec(int nochdir, int noclose, char **argv);
 #endif
 extern int get_terminal_width_height(const int fd, int *width, int
*height);
@@ -761,7 +762,6 @@
 };

 #define FILEUTILS_CP_OPTSTR "pdRfils" USE_SELINUX("c")
-extern smallint re_execed;
 extern const char *applet_name;
 extern const char BB_BANNER[];


Index: applets/busybox.c
===================================================================
--- applets/busybox.c   (revision 18224)
+++ applets/busybox.c   (working copy)
@@ -7,7 +7,9 @@
 #include "busybox.h"

 const char *applet_name ATTRIBUTE_EXTERNALLY_VISIBLE;
-smallint re_execed;
+#ifdef BB_NOMMU
+smallint re_execed = 0;
+#endif

 #ifdef CONFIG_FEATURE_INSTALLER
 /*
@@ -60,11 +62,13 @@
 {
        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 == '-')

====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
03-24-07 07:36  rockeychu      New Issue                                    
03-24-07 07:36  rockeychu      Status                   new => assigned     
03-24-07 07:36  rockeychu      Assigned To               => BusyBox         
======================================================================




More information about the busybox-cvs mailing list