]> granicus.if.org Git - strace/blob - access.c
net: move fallback definitions of SOL_* constants to xlat/
[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 SYS_FUNC(access)
19 {
20         return decode_access(tcp, 0);
21 }
22
23 SYS_FUNC(faccessat)
24 {
25         if (entering(tcp))
26                 print_dirfd(tcp, tcp->u_arg[0]);
27         return decode_access(tcp, 1);
28 }