Oops. Forgot the usleep.c file.
[oweals/busybox.git] / reboot.c
index 1339a60f45592cc2084110997753567aa71b8f5b..2f8b2b4a5275487b25e58dd893c2985c748aea1c 100644 (file)
--- a/reboot.c
+++ b/reboot.c
@@ -1,3 +1,4 @@
+/* vi: set sw=4 ts=4: */
 /*
  * Mini reboot implementation for busybox
  *
 #include "internal.h"
 #include <signal.h>
 
-extern int
-reboot_main(int argc, char ** argv)
+extern int reboot_main(int argc, char **argv)
 {
-    /* don't assume init's pid == 1 */
-    exit( kill(findInitPid(), SIGINT));
+#ifdef BB_FEATURE_LINUXRC
+       /* don't assume init's pid == 1 */
+       exit(kill(findPidByName("init"), SIGINT));
+#else
+       exit(kill(1, SIGINT));
+#endif
 }
+
+/*
+Local Variables:
+c-file-style: "linux"
+c-basic-offset: 4
+tab-width: 4
+End:
+*/