summary refs log tree commit diff stats
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorRiku Voipio <riku.voipio@nokia.com>2010-03-26 15:25:11 +0000
committerAurelien Jarno <aurelien@aurel32.net>2010-03-26 17:15:10 +0100
commitc05c7a7306a23a4b01d1606172b142c45caffc92 (patch)
tree7ceaf846d7ecf4f8b989b95481dfb6f585101e31 /linux-user/syscall.c
parentbedd2912c83b1a87a6bfe3f59a892fd65cda7084 (diff)
downloadfocaccia-qemu-c05c7a7306a23a4b01d1606172b142c45caffc92.tar.gz
focaccia-qemu-c05c7a7306a23a4b01d1606172b142c45caffc92.zip
linux-user: add inotify_init1 syscall support
New syscall which gets actively used when you have a
fresh kernel.

Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 80d8633473..80acf70ce8 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -506,9 +506,18 @@ static int sys_inotify_rm_watch(int fd, int32_t wd)
   return (inotify_rm_watch(fd, wd));
 }
 #endif
+#ifdef CONFIG_INOTIFY1
+#if defined(TARGET_NR_inotify_init1) && defined(__NR_inotify_init1)
+static int sys_inotify_init1(int flags)
+{
+  return (inotify_init1(flags));
+}
+#endif
+#endif
 #else
 /* Userspace can usually survive runtime without inotify */
 #undef TARGET_NR_inotify_init
+#undef TARGET_NR_inotify_init1
 #undef TARGET_NR_inotify_add_watch
 #undef TARGET_NR_inotify_rm_watch
 #endif /* CONFIG_INOTIFY  */
@@ -7055,6 +7064,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
         ret = get_errno(sys_inotify_init());
         break;
 #endif
+#if defined(TARGET_NR_inotify_init1) && defined(__NR_inotify_init1)
+    case TARGET_NR_inotify_init1:
+        ret = get_errno(sys_inotify_init1(arg1));
+        break;
+#endif
 #if defined(TARGET_NR_inotify_add_watch) && defined(__NR_inotify_add_watch)
     case TARGET_NR_inotify_add_watch:
         p = lock_user_string(arg2);