summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/linux/inotify_add_watch.c7
-rw-r--r--src/linux/inotify_init.c7
-rw-r--r--src/linux/inotify_init1.c7
-rw-r--r--src/linux/inotify_rm_watch.c7
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);
+}