fcntl.c 325 B

123456789101112131415
  1. #include <libc/fcntl.h>
  2. #include <libsystem/syscall.h>
  3. /**
  4. * @brief 打开文件的接口
  5. *
  6. * @param path 文件路径
  7. * @param options 打开选项
  8. * @param ...
  9. * @return int 文件描述符
  10. */
  11. int open(const char *path, int options, ...)
  12. {
  13. return syscall_invoke(SYS_OPEN, (uint64_t)path, 0, 0, 0, 0, 0, 0, 0);
  14. }