Dmitry V. Levin | 2f332e9 | 2014-02-05 15:43:04 +0000 | [diff] [blame] | 1 | #include "defs.h" |
| 2 | #include <fcntl.h> |
Dmitry V. Levin | 2f332e9 | 2014-02-05 15:43:04 +0000 | [diff] [blame] | 3 | |
Dmitry V. Levin | 0ed617b | 2014-04-25 23:30:54 +0000 | [diff] [blame] | 4 | #include "xlat/inotify_flags.h" |
Dmitry V. Levin | 0ed617b | 2014-04-25 23:30:54 +0000 | [diff] [blame] | 5 | #include "xlat/inotify_init_flags.h" |
Dmitry V. Levin | 2f332e9 | 2014-02-05 15:43:04 +0000 | [diff] [blame] | 6 | |
| 7 | int |
| 8 | sys_inotify_add_watch(struct tcb *tcp) |
| 9 | { |
| 10 | if (entering(tcp)) { |
| 11 | /* file descriptor */ |
| 12 | printfd(tcp, tcp->u_arg[0]); |
| 13 | tprints(", "); |
| 14 | /* pathname */ |
| 15 | printpath(tcp, tcp->u_arg[1]); |
| 16 | tprints(", "); |
| 17 | /* mask */ |
| 18 | printflags(inotify_flags, tcp->u_arg[2], "IN_???"); |
| 19 | } |
| 20 | return 0; |
| 21 | } |
| 22 | |
| 23 | int |
| 24 | sys_inotify_rm_watch(struct tcb *tcp) |
| 25 | { |
| 26 | if (entering(tcp)) { |
| 27 | /* file descriptor */ |
| 28 | printfd(tcp, tcp->u_arg[0]); |
| 29 | /* watch descriptor */ |
| 30 | tprintf(", %d", (int) tcp->u_arg[1]); |
| 31 | } |
| 32 | return 0; |
| 33 | } |
| 34 | |
| 35 | int |
| 36 | sys_inotify_init1(struct tcb *tcp) |
| 37 | { |
| 38 | if (entering(tcp)) |
| 39 | printflags(inotify_init_flags, tcp->u_arg[0], "IN_???"); |
| 40 | return 0; |
| 41 | } |