blob: 4ee34c6dac6b068dfc522ea2a727539437827e70 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#include <Kernel/Syscall.h>
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stdio.h>
extern "C" {
int fcntl(int fd, int cmd, ...)
{
va_list ap;
va_start(ap, cmd);
u32 extra_arg = va_arg(ap, u32);
int rc = syscall(SC_fcntl, fd, cmd, extra_arg);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int watch_file(const char* path, int path_length)
{
int rc = syscall(SC_watch_file, path, path_length);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
}
|