aboutsummaryrefslogtreecommitdiff
path: root/init/halt.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/halt.c')
-rw-r--r--init/halt.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/init/halt.c b/init/halt.c
index a84a72747..1aac0faf9 100644
--- a/init/halt.c
+++ b/init/halt.c
@@ -43,7 +43,6 @@
43//usage: "[-d DELAY] [-n] [-f]" IF_FEATURE_WTMP(" [-w]") 43//usage: "[-d DELAY] [-n] [-f]" IF_FEATURE_WTMP(" [-w]")
44//usage:#define halt_full_usage "\n\n" 44//usage:#define halt_full_usage "\n\n"
45//usage: "Halt the system\n" 45//usage: "Halt the system\n"
46//usage: "\nOptions:"
47//usage: "\n -d SEC Delay interval" 46//usage: "\n -d SEC Delay interval"
48//usage: "\n -n Do not sync" 47//usage: "\n -n Do not sync"
49//usage: "\n -f Force (don't go through init)" 48//usage: "\n -f Force (don't go through init)"
@@ -55,7 +54,6 @@
55//usage: "[-d DELAY] [-n] [-f]" 54//usage: "[-d DELAY] [-n] [-f]"
56//usage:#define poweroff_full_usage "\n\n" 55//usage:#define poweroff_full_usage "\n\n"
57//usage: "Halt and shut off power\n" 56//usage: "Halt and shut off power\n"
58//usage: "\nOptions:"
59//usage: "\n -d SEC Delay interval" 57//usage: "\n -d SEC Delay interval"
60//usage: "\n -n Do not sync" 58//usage: "\n -n Do not sync"
61//usage: "\n -f Force (don't go through init)" 59//usage: "\n -f Force (don't go through init)"
@@ -64,7 +62,6 @@
64//usage: "[-d DELAY] [-n] [-f]" 62//usage: "[-d DELAY] [-n] [-f]"
65//usage:#define reboot_full_usage "\n\n" 63//usage:#define reboot_full_usage "\n\n"
66//usage: "Reboot the system\n" 64//usage: "Reboot the system\n"
67//usage: "\nOptions:"
68//usage: "\n -d SEC Delay interval" 65//usage: "\n -d SEC Delay interval"
69//usage: "\n -n Do not sync" 66//usage: "\n -n Do not sync"
70//usage: "\n -f Force (don't go through init)" 67//usage: "\n -f Force (don't go through init)"
@@ -157,11 +154,13 @@ int halt_main(int argc UNUSED_PARAM, char **argv)
157 /* runlevels: 154 /* runlevels:
158 * 0 == shutdown 155 * 0 == shutdown
159 * 6 == reboot */ 156 * 6 == reboot */
160 rc = execlp(CONFIG_TELINIT_PATH, 157 execlp(CONFIG_TELINIT_PATH,
161 CONFIG_TELINIT_PATH, 158 CONFIG_TELINIT_PATH,
162 which == 2 ? "6" : "0", 159 which == 2 ? "6" : "0",
163 (char *)NULL 160 (char *)NULL
164 ); 161 );
162 perror_msg_and_die("can't execute '%s'",
163 CONFIG_TELINIT_PATH);
165 } 164 }
166 } 165 }
167 } else { 166 } else {