🆕 运行文件系统中的二进制程序

This commit is contained in:
fslongjin
2022-05-06 00:25:32 +08:00
parent 099b24539a
commit 0aec6827ee
24 changed files with 673 additions and 68 deletions

15
user/libs/libc/fcntl.c Normal file
View File

@ -0,0 +1,15 @@
#include <libc/fcntl.h>
#include <libsystem/syscall.h>
/**
* @brief 打开文件的接口
*
* @param path 文件路径
* @param options 打开选项
* @param ...
* @return int 文件描述符
*/
int open(const char *path, int options, ...)
{
return syscall_invoke(SYS_OPEN, (uint64_t)path, 0, 0, 0, 0, 0, 0, 0);
}