mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-19 00:46:31 +00:00
🆕 增加重启命令reboot
This commit is contained in:
@ -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);
|
||||
}
|
@ -14,6 +14,7 @@
|
||||
#define SYS_VFORK 8
|
||||
#define SYS_BRK 9
|
||||
#define SYS_SBRK 10
|
||||
#define SYS_REBOOT 11
|
||||
|
||||
/**
|
||||
* @brief 用户态系统调用函数
|
||||
|
Reference in New Issue
Block a user