Remove returned bool from access and faccessat in sys/linux.

Switch to using AT_EMPTY_PATH to execve with file descriptors.
This commit is contained in:
jason
2024-08-04 00:59:40 -04:00
parent 2b89829b52
commit 2a7db08c20
3 changed files with 45 additions and 24 deletions
+1 -2
View File
@@ -386,8 +386,7 @@ _fchtimes :: proc(f: ^File, atime, mtime: time.Time) -> Error {
_exists :: proc(name: string) -> bool {
TEMP_ALLOCATOR_GUARD()
name_cstr, _ := temp_cstring(name)
res, errno := linux.access(name_cstr, linux.F_OK)
return !res && errno == .NONE
return linux.access(name_cstr, linux.F_OK) == .NONE
}
/* For reading Linux system files that stat to size 0 */