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