1/*
2 * Copyright 2002-2009, Axel D��rfler, axeld@pinc-software.de.
3 * Distributed under the terms of the MIT License.
4 */
5
6
7#include <errno.h>
8#include <unistd.h>
9
10#include <errno_private.h>
11#include <syscalls.h>
12#include <syscall_utils.h>
13
14
15int
16access(const char* path, int accessMode)
17{
18	status_t status = _kern_access(-1, path, accessMode, false);
19
20	RETURN_AND_SET_ERRNO(status);
21}
22
23
24int
25faccessat(int fd, const char* path, int accessMode, int flag)
26{
27	status_t status = _kern_access(fd, path, accessMode,
28		(flag & AT_EACCESS) != 0);
29
30	RETURN_AND_SET_ERRNO(status);
31}
32