Dmitry V. Levin | ad5cf1e | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 1 | #include "defs.h" |
| 2 | |
Dmitry V. Levin | a4d4572 | 2015-07-20 17:30:38 +0000 | [diff] [blame] | 3 | static void |
| 4 | decode_chmod(struct tcb *tcp, const int offset) |
Dmitry V. Levin | ad5cf1e | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 5 | { |
Dmitry V. Levin | a4d4572 | 2015-07-20 17:30:38 +0000 | [diff] [blame] | 6 | printpath(tcp, tcp->u_arg[offset]); |
| 7 | tprintf(", %#lo", tcp->u_arg[offset + 1]); |
Dmitry V. Levin | ad5cf1e | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 8 | } |
| 9 | |
Dmitry V. Levin | a0bd374 | 2015-04-07 01:36:50 +0000 | [diff] [blame] | 10 | SYS_FUNC(chmod) |
Dmitry V. Levin | ad5cf1e | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 11 | { |
Dmitry V. Levin | a4d4572 | 2015-07-20 17:30:38 +0000 | [diff] [blame] | 12 | decode_chmod(tcp, 0); |
| 13 | |
| 14 | return RVAL_DECODED; |
Dmitry V. Levin | ad5cf1e | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 15 | } |
| 16 | |
Dmitry V. Levin | a0bd374 | 2015-04-07 01:36:50 +0000 | [diff] [blame] | 17 | SYS_FUNC(fchmodat) |
Dmitry V. Levin | ad5cf1e | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 18 | { |
Dmitry V. Levin | a4d4572 | 2015-07-20 17:30:38 +0000 | [diff] [blame] | 19 | print_dirfd(tcp, tcp->u_arg[0]); |
| 20 | decode_chmod(tcp, 1); |
| 21 | |
| 22 | return RVAL_DECODED; |
Dmitry V. Levin | ad5cf1e | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 23 | } |
| 24 | |
Dmitry V. Levin | a0bd374 | 2015-04-07 01:36:50 +0000 | [diff] [blame] | 25 | SYS_FUNC(fchmod) |
Dmitry V. Levin | ad5cf1e | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 26 | { |
Dmitry V. Levin | a4d4572 | 2015-07-20 17:30:38 +0000 | [diff] [blame] | 27 | printfd(tcp, tcp->u_arg[0]); |
| 28 | tprintf(", %#lo", tcp->u_arg[1]); |
| 29 | |
| 30 | return RVAL_DECODED; |
Dmitry V. Levin | ad5cf1e | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 31 | } |