diff options
author | Ian Moffett <ian@osmora.org> | 2025-08-19 17:50:55 +0000 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-08-19 18:26:14 +0000 |
commit | a49e0a6980e3bbbea1365bd18e989b95b8f3cf02 (patch) | |
tree | 259fa110d2d8fc709b9d811a5336150fc5dac322 /usr.bin/osh | |
parent | 633645d9f0bebf8f5d813e34d0e9684977253a7c (diff) |
osh: Seperate 'shutdown' command from builtins
Gives the shutdown command its own binary in /usr/bin/shutdown
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'usr.bin/osh')
-rw-r--r-- | usr.bin/osh/osh.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/usr.bin/osh/osh.c b/usr.bin/osh/osh.c index 1c9f508..71ca6de 100644 --- a/usr.bin/osh/osh.c +++ b/usr.bin/osh/osh.c @@ -29,7 +29,6 @@ #include <sys/types.h> #include <sys/cdefs.h> -#include <sys/reboot.h> #include <sys/errno.h> #include <sys/spawn.h> #include <sys/wait.h> @@ -58,7 +57,6 @@ "help - Display this help message\n" \ "echo - Print the arguments to the console\n" \ "reboot - Reboot the machine\n" \ - "shutdown - Power off the machine\n" \ "kmsg - Print kernel message buffer\n" \ "fetch - System information\n" \ "kfg - Start up kfgwm\n" \ @@ -78,7 +76,6 @@ static bool bs_bell = true; /* Beep on backspace */ static void cmd_help(int argc, char *argv[]); static void cmd_echo(int argc, char *argv[]); static void cmd_exit(int argc, char *argv[]); -static void cmd_shutdown(int argc, char *argv[]); static void cmd_bell(int argc, char *argv[]); static void cmd_clear(int argc, char *argv[]); @@ -99,7 +96,6 @@ struct parse_state { static struct builtin_cmd cmds[] = { {"help",cmd_help}, {"exit",cmd_exit}, - {"shutdown", cmd_shutdown}, {"bell", cmd_bell}, {"clear", cmd_clear}, {NULL, NULL} @@ -118,12 +114,6 @@ cmd_exit(int argc, char *argv[]) } static void -cmd_shutdown(int argc, char *argv[]) -{ - cpu_reboot(REBOOT_POWEROFF | REBOOT_HALT); -} - -static void cmd_clear(int argc, char *argv[]) { fputs("\033[2J", stdout); |