diff --git a/fuse/opcode.go b/fuse/opcode.go index 3a474915..2711c57b 100644 --- a/fuse/opcode.go +++ b/fuse/opcode.go @@ -198,6 +198,12 @@ func doCreate(server *Server, req *request) { req.status = status } +func doTmpFile(server *Server, req *request) { + out := (*CreateOut)(req.outData()) + status := server.fileSystem.Create(req.cancel, (*CreateIn)(req.inData), req.filenames[0], out) + req.status = status +} + func doReadDir(server *Server, req *request) { in := (*ReadIn)(req.inData) buf := server.allocOut(req, in.Size) @@ -799,7 +805,7 @@ func init() { _OP_INTERRUPT: doInterrupt, _OP_COPY_FILE_RANGE: doCopyFileRange, _OP_LSEEK: doLseek, - _OP_TMPFILE: doCreate, + _OP_TMPFILE: doTmpFile, } { handler := v operationHandlers[op].Func = func(s *Server, r *request) {