PatchworkOS
19e446b
A non-POSIX operating system.
Theme:
Default
Round
Robot
Loading...
Searching...
No Matches
openat.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
6
#include "
user/common/syscalls.h
"
7
8
fd_t
openat
(
fd_t
from,
const
char
* path)
9
{
10
fd_t
fd =
_syscall_openat
(from, path);
11
if
(fd ==
ERR
)
12
{
13
errno
=
_syscall_errno
();
14
}
15
return
fd;
16
}
errno
#define errno
Error number variable.
Definition
errno.h:27
openat
fd_t openat(fd_t from, const char *path)
System call for opening files relative to another file descriptor.
Definition
openat.c:8
ERR
#define ERR
Integer error value.
Definition
ERR.h:17
fd_t
__UINT64_TYPE__ fd_t
File descriptor type.
Definition
fd_t.h:10
fs.h
stdarg.h
stdio.h
stdlib.h
syscalls.h
_syscall_errno
static errno_t _syscall_errno(void)
Definition
syscalls.h:107
_syscall_openat
static fd_t _syscall_openat(fd_t from, const char *path)
Definition
syscalls.h:247
src
libstd
user
functions
fs
openat.c
Generated on Sat Jan 24 2026 10:59:25 for PatchworkOS by
1.9.8