From 095a5ae6f2466cdd457cdf3e9925b1fbd302c9be Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sat, 19 Feb 2011 02:52:29 -0500 Subject: add syscall wrappers for inotify --- src/linux/inotify_add_watch.c | 7 +++++++ src/linux/inotify_init.c | 7 +++++++ src/linux/inotify_init1.c | 7 +++++++ src/linux/inotify_rm_watch.c | 7 +++++++ 4 files changed, 28 insertions(+) create mode 100644 src/linux/inotify_add_watch.c create mode 100644 src/linux/inotify_init.c create mode 100644 src/linux/inotify_init1.c create mode 100644 src/linux/inotify_rm_watch.c (limited to 'src') 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 +#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 +#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 +#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 +#include "syscall.h" + +int inotify_rm_watch(int fd, uint32_t wd) +{ + return syscall2(__NR_inotify_rm_watch, fd, wd); +} -- cgit v1.2.1