toaruos/libc/unistd/access.c

13 lines
229 B
C
Raw Normal View History

2018-04-17 14:03:19 +03:00
#include <unistd.h>
#include <errno.h>
#include <syscall.h>
2018-04-17 14:03:19 +03:00
int access(const char *pathname, int mode) {
int result = syscall_access((char *)pathname, mode);
if (result < 0) {
errno = ENOENT; /* XXX */
}
return result;
}