Minor fixes + cleanup in os2 and sys/linux

Add NOFOLLOW to os2.remove
Change Dev from int to u64 and make relavant casts
Fix compat64_arg_pair
This commit is contained in:
jason
2025-01-02 11:03:24 -05:00
parent fdd3b46c10
commit ce1f3b34c0
5 changed files with 7 additions and 8 deletions
+1 -1
View File
@@ -275,7 +275,7 @@ _remove :: proc(name: string) -> Error {
TEMP_ALLOCATOR_GUARD()
name_cstr := temp_cstring(name) or_return
if fd, errno := linux.open(name_cstr, _OPENDIR_FLAGS); errno == .NONE {
if fd, errno := linux.open(name_cstr, _OPENDIR_FLAGS + {.NOFOLLOW}); errno == .NONE {
linux.close(fd)
return _get_platform_error(linux.rmdir(name_cstr))
}
-2
View File
@@ -77,8 +77,6 @@ _mkdir_all :: proc(path: string, perm: int) -> Error {
}
_remove_all :: proc(path: string) -> Error {
DT_DIR :: 4
remove_all_dir :: proc(dfd: linux.Fd) -> Error {
n := 64
buf := make([]u8, n)