aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-02-03 02:42:47 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-02-03 02:42:47 +0000
commite968fcd562da08591b0f7990b839174ad93fc7b4 (patch)
treeb384ef17e45d26a9e73b60c04eeb2935211661ef /init
parent4921b54f37125a58d5ea1a8aac886ae781517bc1 (diff)
downloadbusybox-e968fcd562da08591b0f7990b839174ad93fc7b4.tar.gz
lineedit: add missing #if/#endif
init: fix warnings
Diffstat (limited to 'init')
-rw-r--r--init/init.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/init/init.c b/init/init.c
index 110af8566..b652bc1f4 100644
--- a/init/init.c
+++ b/init/init.c
@@ -727,20 +727,19 @@ static void exec_signal(int sig ATTRIBUTE_UNUSED)
static void shutdown_signal(int sig)
{
- char *m;
+ const char *m;
int rb;
shutdown_system();
+ m = "halt";
+ rb = RB_HALT_SYSTEM;
if (sig == SIGTERM) {
m = "reboot";
rb = RB_AUTOBOOT;
} else if (sig == SIGUSR2) {
m = "poweroff";
rb = RB_POWER_OFF;
- } else {
- m = "halt";
- rb = RB_HALT_SYSTEM;
}
message(CONSOLE | LOG, "Requesting system %s.", m);
sync();
@@ -775,7 +774,7 @@ static void cont_handler(int sig ATTRIBUTE_UNUSED)
got_cont = 1;
}
-#endif /* ! ENABLE_DEBUG_INIT */
+#endif /* !ENABLE_DEBUG_INIT */
static void new_init_action(int action, const char *command, const char *cons)
{