diff options
| author | Rob Landley <rob@landley.net> | 2006-03-10 19:22:06 +0000 |
|---|---|---|
| committer | Rob Landley <rob@landley.net> | 2006-03-10 19:22:06 +0000 |
| commit | bc68cd14ccaebc17e7e03a08e51fddfb91007624 (patch) | |
| tree | beb32cedafc6232bf8a49fe90f0769d471ea6791 /init | |
| parent | dae6aa28598cb2353291f18ca52e768c3259165a (diff) | |
| download | busybox-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.c | 25 |
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 | }; |
| 50 | static const int VT_GETSTATE = 0x5603; /* get global vt state info */ | 50 | enum { VT_GETSTATE = 0x5603 }; /* get global vt state info */ |
| 51 | 51 | ||
| 52 | /* From <linux/serial.h> */ | 52 | /* From <linux/serial.h> */ |
| 53 | struct serial_struct { | 53 | struct serial_struct { |
| @@ -145,22 +145,25 @@ static char console[CONSOLE_BUFF_SIZE] = _PATH_CONSOLE; | |||
| 145 | static char *log_console = VC_5; | 145 | static char *log_console = VC_5; |
| 146 | #endif | 146 | #endif |
| 147 | static sig_atomic_t got_cont = 0; | 147 | static sig_atomic_t got_cont = 0; |
| 148 | static const int LOG = 0x1; | 148 | |
| 149 | static const int CONSOLE = 0x2; | 149 | enum { |
| 150 | LOG = 0x1, | ||
| 151 | CONSOLE = 0x2, | ||
| 150 | 152 | ||
| 151 | #if defined CONFIG_FEATURE_EXTRA_QUIET | 153 | #if defined CONFIG_FEATURE_EXTRA_QUIET |
| 152 | static 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 | ||
| 157 | static const int RB_HALT_SYSTEM = 0xcdef0123; | ||
| 158 | static const int RB_ENABLE_CAD = 0x89abcdef; | ||
| 159 | static const int RB_DISABLE_CAD = 0; | ||
| 160 | 158 | ||
| 161 | #define RB_POWER_OFF 0x4321fedc | 159 | #ifndef RB_HALT_SYSTEM |
| 162 | static 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 | ||
| 165 | static const char * const environment[] = { | 168 | static const char * const environment[] = { |
| 166 | "HOME=/", | 169 | "HOME=/", |
