Skip to content

Latest commit

 

History

History
25 lines (14 loc) · 729 Bytes

open.md

File metadata and controls

25 lines (14 loc) · 729 Bytes

Syscall open

User Mode

#include <fcntl.h>
int open(const char *name, int32_t flags, ... /*mode_t mode*/)

Open a file, optionally creating it. flags : See sys/fcntl.h for flag defines.

Note: If flag O_CREAT is provided, mode must be set (otherwise it gets ignored).

Kernel Mode

Implemented in sys_file.c as sys_open().

See also

Overview: syscalls

File Management Syscalls: mkdir | rmdir | get_dirent | mknod | open | close | read | write | lseek | dup | link | unlink | fstat