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 <syscalls.h> 11 #include <syscall_utils.h> 12 13 14 int 15 access(const char* path, int accessMode) 16 { 17 status_t status = _kern_access(-1, path, accessMode, false); 18 19 RETURN_AND_SET_ERRNO(status); 20 } 21 22 23 int 24 faccessat(int fd, const char* path, int accessMode, int flag) 25 { 26 status_t status = _kern_access(fd, path, accessMode, 27 (flag & AT_EACCESS) != 0); 28 29 RETURN_AND_SET_ERRNO(status); 30 } 31