Commit 192d56bb authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

fuse: on Darwin always return OK for STATFS.

OSXFUSE requires STATFS to always be present.
parent 956202f0
......@@ -4,6 +4,7 @@ import (
"bytes"
"log"
"reflect"
"runtime"
"unsafe"
)
......@@ -335,6 +336,12 @@ func doRename(server *Server, req *request) {
func doStatFs(server *Server, req *request) {
out := (*StatfsOut)(req.outData)
req.status = server.fileSystem.StatFs(req.inHeader, out)
if req.status == ENOSYS && runtime.GOOS == "darwin" {
// OSX FUSE requires Statfs to be implemented for the
// mount to succeed.
*out = StatfsOut{}
req.status = OK
}
}
func doIoctl(server *Server, req *request) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment