access(2) should return -1 on error

This commit is contained in:
K. Lange 2019-08-08 09:42:44 +09:00
parent 1ff1175bce
commit 56d412fd31

View File

@ -9,6 +9,7 @@ int access(const char *pathname, int mode) {
int result = syscall_access((char *)pathname, mode);
if (result < 0) {
errno = ENOENT; /* XXX */
return -1;
}
return result;
}