blob: 0c451eae1e6b254133883563e4e401fd661848d8 [file] [log] [blame]
Dmitry V. Levin2f332e92014-02-05 15:43:04 +00001#include "defs.h"
2#include <fcntl.h>
3#include <linux/inotify.h>
4
Dmitry V. Levin0ed617b2014-04-25 23:30:54 +00005#include "xlat/inotify_flags.h"
Dmitry V. Levin2f332e92014-02-05 15:43:04 +00006
Dmitry V. Levin0ed617b2014-04-25 23:30:54 +00007#include "xlat/inotify_init_flags.h"
Dmitry V. Levin2f332e92014-02-05 15:43:04 +00008
9int
10sys_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
25int
26sys_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
37int
38sys_inotify_init1(struct tcb *tcp)
39{
40 if (entering(tcp))
41 printflags(inotify_init_flags, tcp->u_arg[0], "IN_???");
42 return 0;
43}