blob: 32f6b31194da5f552da8c1b53be6ebed7801a90b [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. Levin0ed617b2014-04-25 23:30:54 +00006#include "xlat/inotify_init_flags.h"
Dmitry V. Levin2f332e92014-02-05 15:43:04 +00007
8int
9sys_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
24int
25sys_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
36int
37sys_inotify_init1(struct tcb *tcp)
38{
39 if (entering(tcp))
40 printflags(inotify_init_flags, tcp->u_arg[0], "IN_???");
41 return 0;
42}