summaryrefslogtreecommitdiffhomepage
path: root/init
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2000-07-19 18:01:00 +0000
committerMatt Kraai <kraai@debian.org>2000-07-19 18:01:00 +0000
commit2f46b664b7d7b51319d21b7c2d6b3ca817f5e1c4 (patch)
treed728fbd078450989fefcce5d372db867899e3056 /init
parent91a4400fd5a74c6e954b22b276dd38c7ffaeae33 (diff)
Add usage messages for applets without them.
Diffstat (limited to 'init')
-rw-r--r--init/halt.c3
-rw-r--r--init/poweroff.c3
-rw-r--r--init/reboot.c3
3 files changed, 9 insertions, 0 deletions
diff --git a/init/halt.c b/init/halt.c
index 2ca36d038..7baccf5d4 100644
--- a/init/halt.c
+++ b/init/halt.c
@@ -26,6 +26,9 @@
extern int halt_main(int argc, char **argv)
{
+ if (argc > 1 && strcmp(argv[1], "--help") == 0)
+ usage(halt_usage);
+
#ifdef BB_FEATURE_LINUXRC
/* don't assume init's pid == 1 */
return(kill(*(findPidByName("init")), SIGUSR1));
diff --git a/init/poweroff.c b/init/poweroff.c
index 126a0fb94..b499d141f 100644
--- a/init/poweroff.c
+++ b/init/poweroff.c
@@ -26,6 +26,9 @@
extern int poweroff_main(int argc, char **argv)
{
+ if (argc > 1 && strcmp(argv[1], "--help") == 0)
+ usage(poweroff_usage);
+
#ifdef BB_FEATURE_LINUXRC
/* don't assume init's pid == 1 */
return(kill(*(findPidByName("init")), SIGUSR2));
diff --git a/init/reboot.c b/init/reboot.c
index bde8dbd77..bef9b26f0 100644
--- a/init/reboot.c
+++ b/init/reboot.c
@@ -26,6 +26,9 @@
extern int reboot_main(int argc, char **argv)
{
+ if (argc > 1 && strcmp(argv[1], "--help") == 0)
+ usage(reboot_usage);
+
#ifdef BB_FEATURE_LINUXRC
/* don't assume init's pid == 1 */
return(kill(*(findPidByName("init")), SIGINT));