sys_open

Function sys_open 

Source
pub unsafe fn sys_open(path: *const u8, flags: i32) -> i32
Expand description

Direct syscall to open a file

§Returns

File descriptor or -1 on error

§Safety

The caller must ensure:

  • path points to a valid null-terminated C string
  • The pointer remains valid for the duration of the syscall