🆕 增加重启命令reboot

This commit is contained in:
fslongjin
2022-05-25 14:38:15 +08:00
parent b02f5ea47c
commit 8bd7b64a0b
4 changed files with 22 additions and 2 deletions

View File

@ -2,6 +2,7 @@
#include <libc/string.h>
#include <libc/stdio.h>
#include <libc/stddef.h>
#include <libsystem/syscall.h>
// 当前工作目录在main_loop中初始化
char *shell_current_path = NULL;
@ -163,4 +164,7 @@ int shell_cmd_exec(int argc, char **argv) {}
* @return int
*/
// todo:
int shell_cmd_reboot(int argc, char **argv) {}
int shell_cmd_reboot(int argc, char **argv)
{
return syscall_invoke(SYS_REBOOT, 0, 0, 0, 0, 0, 0, 0, 0);
}