PatchworkOS  19e446b
A non-POSIX operating system.
Loading...
Searching...
No Matches
open.c
Go to the documentation of this file.
1#include <stdarg.h>
2#include <stdio.h>
3#include <stdlib.h>
4#include <sys/fs.h>
5
7
8fd_t open(const char* path)
9{
10 fd_t fd = _syscall_open(path);
11 if (fd == ERR)
12 {
14 }
15 return fd;
16}
#define errno
Error number variable.
Definition errno.h:27
fd_t open(const char *path)
System call for opening files.
Definition open.c:8
#define ERR
Integer error value.
Definition ERR.h:17
__UINT64_TYPE__ fd_t
File descriptor type.
Definition fd_t.h:10
static fd_t _syscall_open(const char *path)
Definition syscalls.h:132
static errno_t _syscall_errno(void)
Definition syscalls.h:107