PatchworkOS
Loading...
Searching...
No Matches
unlink.c
Go to the documentation of this file.
1
#include <
sys/io.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
io.h
syscalls.h
_syscall_remove
static uint64_t _syscall_remove(const char *path)
Definition
syscalls.h:238
_syscall_errno
static errno_t _syscall_errno(void)
Definition
syscalls.h:118
uint64_t
__UINT64_TYPE__ uint64_t
Definition
stdint.h:17
src
libstd
user
functions
io
unlink.c
Generated by
1.9.8