2 #include <linux/fanotify.h>
4 static const struct xlat fan_classes[] = {
6 XLAT(FAN_CLASS_CONTENT),
7 XLAT(FAN_CLASS_PRE_CONTENT),
11 static const struct xlat fan_init_flags[] = {
14 XLAT(FAN_UNLIMITED_QUEUE),
15 XLAT(FAN_UNLIMITED_MARKS),
20 sys_fanotify_init(struct tcb *tcp)
27 flags = tcp->u_arg[0];
28 printxval(fan_classes, flags & FAN_ALL_CLASS_BITS, "FAN_CLASS_???");
29 flags &= ~FAN_ALL_CLASS_BITS;
32 printflags(fan_init_flags, flags, "FAN_???");
35 tprint_open_modes((unsigned) tcp->u_arg[1]);
40 static const struct xlat fan_mark_flags[] = {
42 XLAT(FAN_MARK_REMOVE),
43 XLAT(FAN_MARK_DONT_FOLLOW),
44 XLAT(FAN_MARK_ONLYDIR),
46 XLAT(FAN_MARK_IGNORED_MASK),
47 XLAT(FAN_MARK_IGNORED_SURV_MODIFY),
52 static const struct xlat fan_event_flags[] = {
56 XLAT(FAN_CLOSE_WRITE),
57 XLAT(FAN_CLOSE_NOWRITE),
61 XLAT(FAN_ACCESS_PERM),
63 XLAT(FAN_EVENT_ON_CHILD),
68 sys_fanotify_mark(struct tcb *tcp)
73 printfd(tcp, tcp->u_arg[0]);
75 printflags(fan_mark_flags, (unsigned) tcp->u_arg[1], "FAN_MARK_???");
77 printflags(fan_event_flags, tcp->u_arg[2], "FAN_???");
79 if ((int) tcp->u_arg[3] == FAN_NOFD)
80 tprints("FAN_NOFD, ");
82 print_dirfd(tcp, tcp->u_arg[3]);
83 printpath(tcp, tcp->u_arg[4]);