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:
Bananymous
2023-09-28 12:36:47 +03:00
parent d45bf363f1
commit 6eda65eea6
9 changed files with 100 additions and 2 deletions

View File

@@ -111,6 +111,8 @@ namespace Kernel
BAN::ErrorOr<long> sys_sync(bool should_block);
BAN::ErrorOr<long> sys_poweroff(int command);
BAN::ErrorOr<void> mount(BAN::StringView source, BAN::StringView target);
BAN::ErrorOr<long> sys_read_dir_entries(int fd, DirectoryEntryList* buffer, size_t buffer_size);