Kernel/LibC/Userspace: Add SYS_POWEROFF + cli tool

You can now shutdown/reboot banan-os with the poweroff cli tool.

Reboot doesn't seem to work on qemu.
This commit is contained in:
2023-09-28 12:36:47 +03:00
parent d45bf363f1
commit 6eda65eea6
9 changed files with 100 additions and 2 deletions

View File

@@ -196,6 +196,9 @@ namespace Kernel
case SYS_TTY_CTRL:
ret = Process::current().sys_tty_ctrl((int)arg1, (int)arg2, (int)arg3);
break;
case SYS_POWEROFF:
ret = Process::current().sys_poweroff((int)arg1);
break;
default:
dwarnln("Unknown syscall {}", syscall);
break;