support linux kernel apis (new archs) with old syscalls removed
[musl] / src / linux / inotify.c
1 #include <sys/inotify.h>
2 #include "syscall.h"
3
4 int inotify_init()
5 {
6         return inotify_init1(0);
7 }
8 int inotify_init1(int flags)
9 {
10         int r = __syscall(SYS_inotify_init1, flags);
11 #ifdef SYS_inotify_init
12         if (r==-ENOSYS && !flags) r = __syscall(SYS_inotify_init);
13 #endif
14         return __syscall_ret(r);
15 }
16
17 int inotify_add_watch(int fd, const char *pathname, uint32_t mask)
18 {
19         return syscall(SYS_inotify_add_watch, fd, pathname, mask);
20 }
21
22 int inotify_rm_watch(int fd, int wd)
23 {
24         return syscall(SYS_inotify_rm_watch, fd, wd);
25 }