diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-01-28 23:56:31 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-01-28 23:56:31 +0000 |
commit | b2b2c404b5f2d67adfddc16e8f224e6ab5a7d18f (patch) | |
tree | 43fb3e2c82103a6af3ec6265cb91eba53e2c0443 | |
parent | a7542dd619b14fcb883f39dd59a6746459c4e6c4 (diff) | |
download | busybox-w32-b2b2c404b5f2d67adfddc16e8f224e6ab5a7d18f.tar.gz busybox-w32-b2b2c404b5f2d67adfddc16e8f224e6ab5a7d18f.tar.bz2 busybox-w32-b2b2c404b5f2d67adfddc16e8f224e6ab5a7d18f.zip |
init: reduce ifdef forest (specially for Rob's happiness)
-rw-r--r-- | init/init.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/init/init.c b/init/init.c index 10f5ba68d..6ff9953b8 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -64,13 +64,7 @@ static const char *log_console = VC_5; | |||
64 | enum { | 64 | enum { |
65 | L_LOG = 0x1, | 65 | L_LOG = 0x1, |
66 | L_CONSOLE = 0x2, | 66 | L_CONSOLE = 0x2, |
67 | 67 | MAYBE_CONSOLE = L_CONSOLE * !ENABLE_FEATURE_EXTRA_QUIET, | |
68 | #if ENABLE_FEATURE_EXTRA_QUIET | ||
69 | MAYBE_CONSOLE = 0x0, | ||
70 | #else | ||
71 | MAYBE_CONSOLE = L_CONSOLE, | ||
72 | #endif | ||
73 | |||
74 | #ifndef RB_HALT_SYSTEM | 68 | #ifndef RB_HALT_SYSTEM |
75 | RB_HALT_SYSTEM = 0xcdef0123, /* FIXME: this overflows enum */ | 69 | RB_HALT_SYSTEM = 0xcdef0123, /* FIXME: this overflows enum */ |
76 | RB_ENABLE_CAD = 0x89abcdef, | 70 | RB_ENABLE_CAD = 0x89abcdef, |
@@ -775,6 +769,8 @@ static void reload_signal(int sig UNUSED_PARAM) | |||
775 | } | 769 | } |
776 | run_actions(RESPAWN | ASKFIRST); | 770 | run_actions(RESPAWN | ASKFIRST); |
777 | } | 771 | } |
772 | #else | ||
773 | void reload_signal(int sig); | ||
778 | #endif | 774 | #endif |
779 | 775 | ||
780 | int init_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 776 | int init_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
@@ -901,11 +897,7 @@ int init_main(int argc UNUSED_PARAM, char **argv) | |||
901 | run_actions(ONCE); | 897 | run_actions(ONCE); |
902 | 898 | ||
903 | /* Redefine SIGHUP to reread /etc/inittab */ | 899 | /* Redefine SIGHUP to reread /etc/inittab */ |
904 | #if ENABLE_FEATURE_USE_INITTAB | 900 | signal(SIGHUP, ENABLE_FEATURE_USE_INITTAB ? reload_signal : SIG_IGN); |
905 | signal(SIGHUP, reload_signal); | ||
906 | #else | ||
907 | signal(SIGHUP, SIG_IGN); | ||
908 | #endif | ||
909 | 901 | ||
910 | /* Now run the looping stuff for the rest of forever */ | 902 | /* Now run the looping stuff for the rest of forever */ |
911 | while (1) { | 903 | while (1) { |