Initial commit
Proof-of-concept implementation. Bugs will occur.
This commit is contained in:
27
vendor/github.com/hanwen/go-fuse/v2/fuse/poll_unix.go
generated
vendored
Normal file
27
vendor/github.com/hanwen/go-fuse/v2/fuse/poll_unix.go
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
//go:build !darwin
|
||||
|
||||
package fuse
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"syscall"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func pollHack(mountPoint string) error {
|
||||
fd, err := syscall.Open(filepath.Join(mountPoint, pollHackName), syscall.O_RDONLY, 0)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
pollData := []unix.PollFd{{
|
||||
Fd: int32(fd),
|
||||
Events: unix.POLLIN | unix.POLLPRI | unix.POLLOUT,
|
||||
}}
|
||||
|
||||
// Trigger _OP_POLL, so we can say ENOSYS. We don't care about
|
||||
// the return value.
|
||||
unix.Poll(pollData, 0)
|
||||
syscall.Close(fd)
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user