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