]> granicus.if.org Git - strace/blob - inotify.c
inotify_init1: mark return code with RVAL_FD flag
[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 SYS_FUNC(inotify_add_watch)
8 {
9         /* file descriptor */
10         printfd(tcp, tcp->u_arg[0]);
11         tprints(", ");
12         /* pathname */
13         printpath(tcp, tcp->u_arg[1]);
14         tprints(", ");
15         /* mask */
16         printflags(inotify_flags, tcp->u_arg[2], "IN_???");
17
18         return RVAL_DECODED;
19 }
20
21 SYS_FUNC(inotify_rm_watch)
22 {
23         /* file descriptor */
24         printfd(tcp, tcp->u_arg[0]);
25         /* watch descriptor */
26         tprintf(", %d", (int) tcp->u_arg[1]);
27
28         return RVAL_DECODED;
29 }
30
31 SYS_FUNC(inotify_init1)
32 {
33         printflags(inotify_init_flags, tcp->u_arg[0], "IN_???");
34
35         return RVAL_DECODED | RVAL_FD;
36 }