Re-add initrd support, unify halt/reboot/poweroff, add -n and -f options.
diff --git a/include/applets.h b/include/applets.h
index 1fb279f..6eb5cfd 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -517,8 +517,8 @@
#ifdef CONFIG_PIVOT_ROOT
APPLET(pivot_root, pivot_root_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
#endif
-#ifdef CONFIG_POWEROFF
- APPLET(poweroff, poweroff_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
+#ifdef CONFIG_HALT
+ APPLET(poweroff, halt_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
#endif
#ifdef CONFIG_PRINTENV
APPLET(printenv, printenv_main, _BB_DIR_BIN, _BB_SUID_NEVER)
@@ -544,8 +544,8 @@
#ifdef CONFIG_REALPATH
APPLET(realpath, realpath_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
#endif
-#ifdef CONFIG_REBOOT
- APPLET(reboot, reboot_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
+#ifdef CONFIG_HALT
+ APPLET(reboot, halt_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
#endif
#ifdef CONFIG_RENICE
APPLET(renice, renice_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
diff --git a/include/usage.h b/include/usage.h
index 61fc3af..71752c7 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -1010,11 +1010,13 @@
"-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n"
#define halt_trivial_usage \
- "[-d<delay>]"
+ "[-d<delay>] [-n<nosync>] [-f<force>]"
#define halt_full_usage \
"Halt the system.\n" \
"Options:\n" \
- "\t-d\t\tdelay interval for halting"
+ "\t-d\t\tdelay interval for halting\n" \
+ "\t-n\t\tno call to sync()\n" \
+ "\t-f\t\tforce halt (don't go through init)\n"
#ifdef CONFIG_FEATURE_HDPARM_GET_IDENTITY
#define USAGE_HDPARM_IDENT(a) a
@@ -2372,11 +2374,13 @@
"the new root file system."
#define poweroff_trivial_usage \
- "[-d<delay>]"
+ "[-d<delay>] [-n<nosync>] [-f<force>]"
#define poweroff_full_usage \
- "Halt the system and request that the kernel shut off the power.\n" \
+ "Halt and shut off power.\n" \
"Options:\n" \
- "\t-d\t\tdelay interval for shutting off"
+ "\t-d\t\tdelay interval for halting\n" \
+ "\t-n\t\tno call to sync()\n" \
+ "\t-f\t\tforce power off (don't go through init)\n"
#define printenv_trivial_usage \
"[VARIABLES...]"
@@ -2475,11 +2479,13 @@
"Returns the absolute pathnames of given argument."
#define reboot_trivial_usage \
- "[-d<delay>]"
+ "[-d<delay>] [-n<nosync>] [-f<force>]"
#define reboot_full_usage \
"Reboot the system.\n" \
"Options:\n" \
- "\t-d\t\tdelay interval for rebooting"
+ "\t-d\t\tdelay interval for rebooting\n" \
+ "\t-n\t\tno call to sync()\n" \
+ "\t-f\t\tforce reboot (don't go through init)\n"
#define renice_trivial_usage \
"{{-n INCREMENT} | PRIORITY} [[ -p | -g | -u ] ID ...]"