fuse integration: use unix.O_DIRECT instead of a hard-coded x86 value

0x4000 is O_DIRECT only on x86 and amd64; on arm64 it is O_DIRECTORY.
The test module already depends on golang.org/x/sys.
This commit is contained in:
Chris Lu committed 2026-10-22 07:35:12 -07:00
1 parent 767b98f6d2
commit 0a4bfa0ca7
1 file changed
+3 -1
+3 -1
View File
@@ -4,12 +4,14 @@ package fuse
import (
"syscall"
"golang.org/x/sys/unix"
)
// Direct I/O support for Linux
const (
O_DIRECT = 0x4000 // Direct I/O flag for Linux
O_DIRECT = unix.O_DIRECT
)
func openDirectIO(path string, flags int, mode uint32) (int, error) {