PatchworkOS
dbbdc99
A non-POSIX operating system.
Theme:
Default
Round
Robot
Loading...
Searching...
No Matches
unlink.c
Go to the documentation of this file.
1
#include <
sys/fs.h
>
2
3
#include "
user/common/syscalls.h
"
4
5
uint64_t
unlink
(
const
char
* path)
6
{
7
uint64_t
result =
_syscall_remove
(path);
8
if
(result ==
ERR
)
9
{
10
errno
=
_syscall_errno
();
11
return
ERR
;
12
}
13
14
return
result;
15
}
errno
#define errno
Error number variable.
Definition
errno.h:27
unlink
uint64_t unlink(const char *path)
Wrapper for removing a file.
Definition
unlink.c:5
ERR
#define ERR
Integer error value.
Definition
ERR.h:17
fs.h
uint64_t
__UINT64_TYPE__ uint64_t
Definition
stdint.h:17
syscalls.h
_syscall_remove
static uint64_t _syscall_remove(const char *path)
Definition
syscalls.h:222
_syscall_errno
static errno_t _syscall_errno(void)
Definition
syscalls.h:107
src
libstd
user
functions
fs
unlink.c
Generated on Thu Mar 5 2026 15:27:55 for PatchworkOS by
1.9.8