1 #include "defs.h"
2
3 static void
decode_chmod(struct tcb * tcp,const int offset)4 decode_chmod(struct tcb *tcp, const int offset)
5 {
6 printpath(tcp, tcp->u_arg[offset]);
7 tprintf(", %#lo", tcp->u_arg[offset + 1]);
8 }
9
SYS_FUNC(chmod)10 SYS_FUNC(chmod)
11 {
12 decode_chmod(tcp, 0);
13
14 return RVAL_DECODED;
15 }
16
SYS_FUNC(fchmodat)17 SYS_FUNC(fchmodat)
18 {
19 print_dirfd(tcp, tcp->u_arg[0]);
20 decode_chmod(tcp, 1);
21
22 return RVAL_DECODED;
23 }
24
SYS_FUNC(fchmod)25 SYS_FUNC(fchmod)
26 {
27 printfd(tcp, tcp->u_arg[0]);
28 tprintf(", %#lo", tcp->u_arg[1]);
29
30 return RVAL_DECODED;
31 }
32