aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorGravatar Rob Landley <rob@landley.net>2006-03-10 19:22:06 +0000
committerGravatar Rob Landley <rob@landley.net>2006-03-10 19:22:06 +0000
commitbc68cd14ccaebc17e7e03a08e51fddfb91007624 (patch)
treebeb32cedafc6232bf8a49fe90f0769d471ea6791 /init
parentdae6aa28598cb2353291f18ca52e768c3259165a (diff)
downloadbusybox-bc68cd14ccaebc17e7e03a08e51fddfb91007624.tar.gz
busybox-bc68cd14ccaebc17e7e03a08e51fddfb91007624.tar.bz2
Patch from Denis Vlasenko turning static const int (which gets emitted into
the busybox binary) into enums (which don't).
Diffstat (limited to 'init')
-rw-r--r--init/init.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/init/init.c b/init/init.c
index b7bc7ef9f..2ddcef936 100644
--- a/init/init.c
+++ b/init/init.c
@@ -47,7 +47,7 @@ struct vt_stat {
unsigned short v_signal; /* signal to send */
unsigned short v_state; /* vt bitmask */
};
-static const int VT_GETSTATE = 0x5603; /* get global vt state info */
+enum { VT_GETSTATE = 0x5603 }; /* get global vt state info */
/* From <linux/serial.h> */
struct serial_struct {
@@ -145,22 +145,25 @@ static char console[CONSOLE_BUFF_SIZE] = _PATH_CONSOLE;
static char *log_console = VC_5;
#endif
static sig_atomic_t got_cont = 0;
-static const int LOG = 0x1;
-static const int CONSOLE = 0x2;
+
+enum {
+ LOG = 0x1,
+ CONSOLE = 0x2,
#if defined CONFIG_FEATURE_EXTRA_QUIET
-static const int MAYBE_CONSOLE = 0x0;
+ MAYBE_CONSOLE = 0x0,
#else
-#define MAYBE_CONSOLE CONSOLE
+ MAYBE_CONSOLE = CONSOLE,
#endif
-#ifndef RB_HALT_SYSTEM
-static const int RB_HALT_SYSTEM = 0xcdef0123;
-static const int RB_ENABLE_CAD = 0x89abcdef;
-static const int RB_DISABLE_CAD = 0;
-#define RB_POWER_OFF 0x4321fedc
-static const int RB_AUTOBOOT = 0x01234567;
+#ifndef RB_HALT_SYSTEM
+ RB_HALT_SYSTEM = 0xcdef0123,
+ RB_ENABLE_CAD = 0x89abcdef,
+ RB_DISABLE_CAD = 0,
+ RB_POWER_OFF = 0x4321fedc,
+ RB_AUTOBOOT = 0x01234567,
#endif
+};
static const char * const environment[] = {
"HOME=/",