]> granicus.if.org Git - strace/blob - access.c
aarch64, arm: decode extra padded compat struct statfs64
[strace] / access.c
1 #include "defs.h"
2
3 #include <fcntl.h>
4
5 #include "xlat/access_flags.h"
6
7 static int
8 decode_access(struct tcb *tcp, int offset)
9 {
10         if (entering(tcp)) {
11                 printpath(tcp, tcp->u_arg[offset]);
12                 tprints(", ");
13                 printflags(access_flags, tcp->u_arg[offset + 1], "?_OK");
14         }
15         return 0;
16 }
17
18 int
19 sys_access(struct tcb *tcp)
20 {
21         return decode_access(tcp, 0);
22 }
23
24 int
25 sys_faccessat(struct tcb *tcp)
26 {
27         if (entering(tcp))
28                 print_dirfd(tcp, tcp->u_arg[0]);
29         return decode_access(tcp, 1);
30 }