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