mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-09 19:36:47 +00:00
15 lines
331 B
C
15 lines
331 B
C
#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, options, 0, 0, 0, 0, 0, 0);
|
|
} |