Dmitry V. Levin | 2f332e9 | 2014-02-05 15:43:04 +0000 | [diff] [blame] | 1 | #include "defs.h" |
| 2 | #include <fcntl.h> |
| 3 | #include <linux/inotify.h> |
| 4 | |
Dmitry V. Levin | 0ed617b | 2014-04-25 23:30:54 +0000 | [diff] [blame] | 5 | #include "xlat/inotify_flags.h" |
Dmitry V. Levin | 0ed617b | 2014-04-25 23:30:54 +0000 | [diff] [blame] | 6 | #include "xlat/inotify_init_flags.h" |
Dmitry V. Levin | 2f332e9 | 2014-02-05 15:43:04 +0000 | [diff] [blame] | 7 | |
| 8 | int |
| 9 | sys_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 | |
| 24 | int |
| 25 | sys_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 | |
| 36 | int |
| 37 | sys_inotify_init1(struct tcb *tcp) |
| 38 | { |
| 39 | if (entering(tcp)) |
| 40 | printflags(inotify_init_flags, tcp->u_arg[0], "IN_???"); |
| 41 | return 0; |
| 42 | } |