1 #include "defs.h"
2 #include <fcntl.h>
3 #include <linux/inotify.h>
4
5 #include "xlat/inotify_flags.h"
6 #include "xlat/inotify_init_flags.h"
7
8 int
sys_inotify_add_watch(struct tcb * tcp)9 sys_inotify_add_watch(struct tcb *tcp)
10 {
11 if (entering(tcp)) {
12 /* file descriptor */
13 printfd(tcp, tcp->u_arg[0]);
14 tprints(", ");
15 /* pathname */
16 printpath(tcp, tcp->u_arg[1]);
17 tprints(", ");
18 /* mask */
19 printflags(inotify_flags, tcp->u_arg[2], "IN_???");
20 }
21 return 0;
22 }
23
24 int
sys_inotify_rm_watch(struct tcb * tcp)25 sys_inotify_rm_watch(struct tcb *tcp)
26 {
27 if (entering(tcp)) {
28 /* file descriptor */
29 printfd(tcp, tcp->u_arg[0]);
30 /* watch descriptor */
31 tprintf(", %d", (int) tcp->u_arg[1]);
32 }
33 return 0;
34 }
35
36 int
sys_inotify_init1(struct tcb * tcp)37 sys_inotify_init1(struct tcb *tcp)
38 {
39 if (entering(tcp))
40 printflags(inotify_init_flags, tcp->u_arg[0], "IN_???");
41 return 0;
42 }
43