this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add missing vchroot integration for inotify_add_watch()

+18 -1
+18 -1
src/kernel/emulation/linux/ext/inotify_add_watch.c
··· 1 1 #include "./sys/inotify.h" 2 2 #include "../errno.h" 3 3 #include "../base.h" 4 + #include "../vchroot_expand.h" 5 + #include "../bsdthread/per_thread_wd.h" 6 + #include "../../../../../platform-include/sys/errno.h" 7 + #include "../errno.h" 4 8 #include <linux-syscalls/linux.h> 5 9 6 10 extern long cerror(int __err); ··· 9 13 int inotify_add_watch (int __fd, const char *__name, uint32_t __mask) 10 14 { 11 15 int rv; 16 + struct vchroot_expand_args vc; 12 17 13 - rv = LINUX_SYSCALL(__NR_inotify_add_watch, __fd, __name, __mask); 18 + if (!__name) 19 + return -EFAULT; 20 + 21 + vc.flags = 0; 22 + vc.dfd = get_perthread_wd(); 23 + 24 + strcpy(vc.path, __name); 25 + rv = vchroot_expand(&vc); 26 + 27 + if (rv < 0) 28 + return errno_linux_to_bsd(rv); 29 + 30 + rv = LINUX_SYSCALL(__NR_inotify_add_watch, __fd, vc.path, __mask); 14 31 if (rv < 0) 15 32 { 16 33 cerror(errno_linux_to_bsd(-rv));