1#include "defs.h"
2
3#include <fcntl.h>
4
5#include "xlat/access_flags.h"
6
7static int
8decode_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
18SYS_FUNC(access)
19{
20	return decode_access(tcp, 0);
21}
22
23SYS_FUNC(faccessat)
24{
25	if (entering(tcp))
26		print_dirfd(tcp, tcp->u_arg[0]);
27	return decode_access(tcp, 1);
28}
29