|
@ -61,12 +61,13 @@ import ( |
|
|
* @param fi file information |
|
|
* @param fi file information |
|
|
*/ |
|
|
*/ |
|
|
func (wfs *WFS) Open(cancel <-chan struct{}, in *fuse.OpenIn, out *fuse.OpenOut) (status fuse.Status) { |
|
|
func (wfs *WFS) Open(cancel <-chan struct{}, in *fuse.OpenIn, out *fuse.OpenOut) (status fuse.Status) { |
|
|
fileHandle, code := wfs.AcquireHandle(in.NodeId, in.Uid, in.Gid) |
|
|
|
|
|
if code == fuse.OK { |
|
|
|
|
|
|
|
|
var fileHandle *FileHandle |
|
|
|
|
|
fileHandle, status = wfs.AcquireHandle(in.NodeId, in.Uid, in.Gid) |
|
|
|
|
|
if status == fuse.OK { |
|
|
out.Fh = uint64(fileHandle.fh) |
|
|
out.Fh = uint64(fileHandle.fh) |
|
|
// TODO https://github.com/libfuse/libfuse/blob/master/include/fuse_common.h#L64
|
|
|
// TODO https://github.com/libfuse/libfuse/blob/master/include/fuse_common.h#L64
|
|
|
} |
|
|
} |
|
|
return code |
|
|
|
|
|
|
|
|
return status |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|