aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-03-10 19:22:06 +0000
committerRob Landley <rob@landley.net>2006-03-10 19:22:06 +0000
commitbc68cd14ccaebc17e7e03a08e51fddfb91007624 (patch)
treebeb32cedafc6232bf8a49fe90f0769d471ea6791 /init
parentdae6aa28598cb2353291f18ca52e768c3259165a (diff)
downloadbusybox-w32-bc68cd14ccaebc17e7e03a08e51fddfb91007624.tar.gz
busybox-w32-bc68cd14ccaebc17e7e03a08e51fddfb91007624.tar.bz2
busybox-w32-bc68cd14ccaebc17e7e03a08e51fddfb91007624.zip
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 {
47 unsigned short v_signal; /* signal to send */ 47 unsigned short v_signal; /* signal to send */
48 unsigned short v_state; /* vt bitmask */ 48 unsigned short v_state; /* vt bitmask */
49}; 49};
50static const int VT_GETSTATE = 0x5603; /* get global vt state info */ 50enum { VT_GETSTATE = 0x5603 }; /* get global vt state info */
51 51
52/* From <linux/serial.h> */ 52/* From <linux/serial.h> */
53struct serial_struct { 53struct serial_struct {
@@ -145,22 +145,25 @@ static char console[CONSOLE_BUFF_SIZE] = _PATH_CONSOLE;
145static char *log_console = VC_5; 145static char *log_console = VC_5;
146#endif 146#endif
147static sig_atomic_t got_cont = 0; 147static sig_atomic_t got_cont = 0;
148static const int LOG = 0x1; 148
149static const int CONSOLE = 0x2; 149enum {
150 LOG = 0x1,
151 CONSOLE = 0x2,
150 152
151#if defined CONFIG_FEATURE_EXTRA_QUIET 153#if defined CONFIG_FEATURE_EXTRA_QUIET
152static const int MAYBE_CONSOLE = 0x0; 154 MAYBE_CONSOLE = 0x0,
153#else 155#else
154#define MAYBE_CONSOLE CONSOLE 156 MAYBE_CONSOLE = CONSOLE,
155#endif 157#endif
156#ifndef RB_HALT_SYSTEM
157static const int RB_HALT_SYSTEM = 0xcdef0123;
158static const int RB_ENABLE_CAD = 0x89abcdef;
159static const int RB_DISABLE_CAD = 0;
160 158
161#define RB_POWER_OFF 0x4321fedc 159#ifndef RB_HALT_SYSTEM
162static const int RB_AUTOBOOT = 0x01234567; 160 RB_HALT_SYSTEM = 0xcdef0123,
161 RB_ENABLE_CAD = 0x89abcdef,
162 RB_DISABLE_CAD = 0,
163 RB_POWER_OFF = 0x4321fedc,
164 RB_AUTOBOOT = 0x01234567,
163#endif 165#endif
166};
164 167
165static const char * const environment[] = { 168static const char * const environment[] = {
166 "HOME=/", 169 "HOME=/",