access.c 229 B

123456789101112
  1. #include <unistd.h>
  2. #include <errno.h>
  3. #include <syscall.h>
  4. int access(const char *pathname, int mode) {
  5. int result = syscall_access((char *)pathname, mode);
  6. if (result < 0) {
  7. errno = ENOENT; /* XXX */
  8. }
  9. return result;
  10. }