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