aboutsummaryrefslogtreecommitdiff
path: root/test/fuse_integration/directio_unsupported.go
blob: dc1168b1cc822d3054ee4fb1d393d717f6fed5af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
}