From a49e0a6980e3bbbea1365bd18e989b95b8f3cf02 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Tue, 19 Aug 2025 17:50:55 +0000 Subject: osh: Seperate 'shutdown' command from builtins Gives the shutdown command its own binary in /usr/bin/shutdown Signed-off-by: Ian Moffett --- usr.bin/osh/osh.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'usr.bin/osh/osh.c') 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 #include -#include #include #include #include @@ -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} @@ -117,12 +113,6 @@ cmd_exit(int argc, char *argv[]) running = 0; } -static void -cmd_shutdown(int argc, char *argv[]) -{ - cpu_reboot(REBOOT_POWEROFF | REBOOT_HALT); -} - static void cmd_clear(int argc, char *argv[]) { -- cgit v1.2.3