wm: teppich

Download patch

ref: 9fc305ae0d3dcde4bc1e0d62dd7dd52e53862f11
parent: e97a0dc45f6266ac067b23dabba72e571bde120b
author: mkf <mkf@cloud9p.org>
date: Tue Nov 28 19:51:46 EST 2023

cmd/reboot: import

--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,7 @@
 	cmd/check.o\
 	cmd/cal.o\
 	cmd/ls.o\
+	cmd/reboot.o\
 
 L = \
 	libc/strlen.o\
--- a/cmd/rc.h
+++ b/cmd/rc.h
@@ -6,6 +6,7 @@
 int check_main(int, char**, char *cwd);
 int cal_main(int, char**, char *cwd);
 int ls_main(int, char**, char *cwd);
+int reboot_main(int, char**, char *cwd);
 
 static prog_t cmdtab[] =
 {
@@ -14,4 +15,5 @@
 	{"check", check_main},
 	{"cal", cal_main},
 	{"ls", ls_main},
+	{"reboot", reboot_main}
 };
--- /dev/null
+++ b/cmd/reboot.c
@@ -1,0 +1,9 @@
+#include <x86.h>
+#include <err.h>
+
+int
+reboot_main(int argc, char **argv, char *cwd)
+{
+	outb(KBC, 0xFE);
+	return OK; /* we likely never get to here, maybe we should do noreturn */
+}