find: support -HLP
[oweals/busybox.git] / init / halt.c
index a84a727477e50dc22d01e19eaa7f1aa551d50b83..7974adb17f0aabbbb59a2804d555cdacd5847e38 100644 (file)
@@ -43,7 +43,6 @@
 //usage:       "[-d DELAY] [-n] [-f]" IF_FEATURE_WTMP(" [-w]")
 //usage:#define halt_full_usage "\n\n"
 //usage:       "Halt the system\n"
-//usage:     "\nOptions:"
 //usage:     "\n       -d SEC  Delay interval"
 //usage:     "\n       -n      Do not sync"
 //usage:     "\n       -f      Force (don't go through init)"
@@ -55,7 +54,6 @@
 //usage:       "[-d DELAY] [-n] [-f]"
 //usage:#define poweroff_full_usage "\n\n"
 //usage:       "Halt and shut off power\n"
-//usage:     "\nOptions:"
 //usage:     "\n       -d SEC  Delay interval"
 //usage:     "\n       -n      Do not sync"
 //usage:     "\n       -f      Force (don't go through init)"
@@ -64,7 +62,6 @@
 //usage:       "[-d DELAY] [-n] [-f]"
 //usage:#define reboot_full_usage "\n\n"
 //usage:       "Reboot the system\n"
-//usage:     "\nOptions:"
 //usage:     "\n       -d SEC  Delay interval"
 //usage:     "\n       -n      Do not sync"
 //usage:     "\n       -f      Force (don't go through init)"
@@ -157,11 +154,13 @@ int halt_main(int argc UNUSED_PARAM, char **argv)
                                /* runlevels:
                                 * 0 == shutdown
                                 * 6 == reboot */
-                               rc = execlp(CONFIG_TELINIT_PATH,
+                               execlp(CONFIG_TELINIT_PATH,
                                                CONFIG_TELINIT_PATH,
                                                which == 2 ? "6" : "0",
                                                (char *)NULL
                                );
+                               bb_perror_msg_and_die("can't execute '%s'",
+                                               CONFIG_TELINIT_PATH);
                        }
                }
        } else {