blob: 89453a98fdb6cea7cf538454fa9c070e14074886 [file] [log] [blame]
Dmitry V. Levinad5cf1e2014-12-06 03:53:16 +00001#include "defs.h"
2
3static int
4decode_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
13int
14sys_chmod(struct tcb *tcp)
15{
16 return decode_chmod(tcp, 0);
17}
18
19int
20sys_fchmodat(struct tcb *tcp)
21{
22 if (entering(tcp))
23 print_dirfd(tcp, tcp->u_arg[0]);
24 return decode_chmod(tcp, 1);
25}
26
27int
28sys_fchmod(struct tcb *tcp)
29{
30 if (entering(tcp)) {
31 printfd(tcp, tcp->u_arg[0]);
32 tprintf(", %#lo", tcp->u_arg[1]);
33 }
34 return 0;
35}