PatchworkOS
3984a1d
A non-POSIX operating system.
Theme:
Default
Round
Robot
Loading...
Searching...
No Matches
readlink.c
Go to the documentation of this file.
1
#include <
stdarg.h
>
2
#include <
stdio.h
>
3
#include <
stdlib.h
>
4
#include <
sys/io.h
>
5
6
#include "
user/common/syscalls.h
"
7
8
size_t
readlink
(
const
char
* path,
char
*
buffer
,
uint64_t
count
)
9
{
10
uint64_t
result =
_syscall_readlink
(path,
buffer
,
count
);
11
if
(result ==
ERR
)
12
{
13
errno
=
_syscall_errno
();
14
}
15
return
result;
16
}
errno
#define errno
Error number variable.
Definition
errno.h:27
readlink
size_t readlink(const char *path, char *buffer, uint64_t count)
System call for reading the target of a symbolic link.
Definition
readlink.c:8
ERR
#define ERR
Integer error value.
Definition
ERR.h:17
io.h
buffer
EFI_PHYSICAL_ADDRESS buffer
Definition
mem.c:15
count
static atomic_long count
Definition
main.c:11
stdarg.h
uint64_t
__UINT64_TYPE__ uint64_t
Definition
stdint.h:17
stdio.h
stdlib.h
syscalls.h
_syscall_errno
static errno_t _syscall_errno(void)
Definition
syscalls.h:113
_syscall_readlink
static uint64_t _syscall_readlink(const char *path, char *buffer, uint64_t size)
Definition
syscalls.h:270
src
libstd
user
functions
io
readlink.c
Generated on Sat Jan 10 2026 00:03:16 for PatchworkOS by
1.9.8