diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-02-19 02:52:29 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-02-19 02:52:29 -0500 |
commit | 095a5ae6f2466cdd457cdf3e9925b1fbd302c9be (patch) | |
tree | 0318183c342722060cd7e9b532148a784eb428b6 /src/linux | |
parent | cc2a8228fa0b35c9aee69efa7ac657bb7a4704f9 (diff) | |
download | musl-095a5ae6f2466cdd457cdf3e9925b1fbd302c9be.tar.gz musl-095a5ae6f2466cdd457cdf3e9925b1fbd302c9be.tar.xz musl-095a5ae6f2466cdd457cdf3e9925b1fbd302c9be.zip |
add syscall wrappers for inotify
Diffstat (limited to 'src/linux')
-rw-r--r-- | src/linux/inotify_add_watch.c | 7 | ||||
-rw-r--r-- | src/linux/inotify_init.c | 7 | ||||
-rw-r--r-- | src/linux/inotify_init1.c | 7 | ||||
-rw-r--r-- | src/linux/inotify_rm_watch.c | 7 |
4 files changed, 28 insertions, 0 deletions
diff --git a/src/linux/inotify_add_watch.c b/src/linux/inotify_add_watch.c new file mode 100644 index 00000000..9973f161 --- /dev/null +++ b/src/linux/inotify_add_watch.c @@ -0,0 +1,7 @@ +#include <sys/inotify.h> +#include "syscall.h" + +int inotify_add_watch(int fd, const char *pathname, uint32_t mask) +{ + return syscall3(__NR_inotify_add_watch, fd, (long)pathname, mask); +} diff --git a/src/linux/inotify_init.c b/src/linux/inotify_init.c new file mode 100644 index 00000000..d378460d --- /dev/null +++ b/src/linux/inotify_init.c @@ -0,0 +1,7 @@ +#include <sys/inotify.h> +#include "syscall.h" + +int inotify_init() +{ + return syscall0(__NR_inotify_init); +} diff --git a/src/linux/inotify_init1.c b/src/linux/inotify_init1.c new file mode 100644 index 00000000..5fad0946 --- /dev/null +++ b/src/linux/inotify_init1.c @@ -0,0 +1,7 @@ +#include <sys/inotify.h> +#include "syscall.h" + +int inotify_init1(int flags) +{ + return syscall1(__NR_inotify_init1, flags); +} diff --git a/src/linux/inotify_rm_watch.c b/src/linux/inotify_rm_watch.c new file mode 100644 index 00000000..0772d719 --- /dev/null +++ b/src/linux/inotify_rm_watch.c @@ -0,0 +1,7 @@ +#include <sys/inotify.h> +#include "syscall.h" + +int inotify_rm_watch(int fd, uint32_t wd) +{ + return syscall2(__NR_inotify_rm_watch, fd, wd); +} |