diff options
Diffstat (limited to 'test/fuse_integration/directio_unsupported.go')
| -rw-r--r-- | test/fuse_integration/directio_unsupported.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/fuse_integration/directio_unsupported.go b/test/fuse_integration/directio_unsupported.go new file mode 100644 index 000000000..dc1168b1c --- /dev/null +++ b/test/fuse_integration/directio_unsupported.go @@ -0,0 +1,29 @@ +//go:build !linux && !darwin + +package fuse + +import ( + "errors" + "syscall" +) + +// Direct I/O support for unsupported platforms + +var ErrDirectIONotSupported = errors.New("direct I/O not supported on this platform") + +const ( + O_DIRECT = 0x4000 // Dummy flag for compatibility +) + +func openDirectIO(path string, flags int, mode uint32) (int, error) { + // Fall back to regular open + fd, err := syscall.Open(path, flags, mode) + if err != nil { + return -1, err + } + return int(fd), nil +} + +func isDirectIOSupported() bool { + return false +} |
