Commit ca24733f authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Rename DefaultRawFuseFile to DefaultFuseFile.

parent d2f8777d
......@@ -5,7 +5,7 @@ package fuse
type ReadOnlyFile struct {
data []byte
DefaultRawFuseFile
DefaultFuseFile
}
func NewReadOnlyFile(data []byte) *ReadOnlyFile {
......
......@@ -137,25 +137,25 @@ func (me *DefaultRawFuseFileSystem) FsyncDir(header *InHeader, input *FsyncIn) (
////////////////////////////////////////////////////////////////
// DefaultRawFuseFile
// DefaultFuseFile
func (me *DefaultRawFuseFile) Read(*ReadIn, *BufferPool) ([]byte, Status) {
func (me *DefaultFuseFile) Read(*ReadIn, *BufferPool) ([]byte, Status) {
return []byte(""), ENOSYS
}
func (me *DefaultRawFuseFile) Write(*WriteIn, []byte) (uint32, Status) {
func (me *DefaultFuseFile) Write(*WriteIn, []byte) (uint32, Status) {
return 0, ENOSYS
}
func (me *DefaultRawFuseFile) Flush() Status {
func (me *DefaultFuseFile) Flush() Status {
return ENOSYS
}
func (me *DefaultRawFuseFile) Release() {
func (me *DefaultFuseFile) Release() {
}
func (me *DefaultRawFuseFile) Fsync(*FsyncIn) (code Status) {
func (me *DefaultFuseFile) Fsync(*FsyncIn) (code Status) {
return ENOSYS
}
......
......@@ -27,7 +27,7 @@ func TestPathFs(t *testing.T) {
}
func TestDummyFile(t *testing.T) {
d := new(DefaultRawFuseFile)
d := new(DefaultFuseFile)
var filePtr RawFuseFile = d
_ = filePtr
}
......@@ -2,7 +2,7 @@ package fuse
// A FUSE file that accepts any write, and always returns EOF.
type DevNullFile struct {
DefaultRawFuseFile
DefaultFuseFile
}
func NewDevNullFile() *DevNullFile {
......
......@@ -47,18 +47,6 @@ type fuseRequest struct {
}
type MountState struct {
// We should store the RawFuseFile/Dirs on the Go side,
// otherwise our files may be GCd. Here, the index is the Fh
// field
openedFiles map[uint64]RawFuseFile
openedFilesMutex sync.RWMutex
nextFreeFile uint64
openedDirs map[uint64]RawFuseDir
openedDirsMutex sync.RWMutex
nextFreeDir uint64
// Empty if unmounted.
mountPoint string
fileSystem RawFileSystem
......@@ -167,8 +155,6 @@ func (me *MountState) Write(req *fuseRequest) {
func NewMountState(fs RawFileSystem) *MountState {
me := new(MountState)
me.openedDirs = make(map[uint64]RawFuseDir)
me.openedFiles = make(map[uint64]RawFuseFile)
me.mountPoint = ""
me.fileSystem = fs
me.buffers = NewBufferPool()
......
......@@ -175,7 +175,7 @@ func (me *LoopbackFileSystem) FillOptions(options *PathFileSystemConnectorOption
type LoopbackFile struct {
file *os.File
DefaultRawFuseFile
DefaultFuseFile
}
func (me *LoopbackFile) Read(input *ReadIn, buffers *BufferPool) ([]byte, Status) {
......
......@@ -598,5 +598,5 @@ type PathFilesystem interface {
type DefaultRawFuseDir struct{}
type DefaultPathFilesystem struct{}
type DefaultRawFuseFile struct{}
type DefaultFuseFile struct{}
type DefaultRawFuseFileSystem struct{}
......@@ -31,7 +31,7 @@ type zipCreateFile struct {
Basename string
zfs *MultiZipFs
fuse.DefaultRawFuseFile
fuse.DefaultFuseFile
}
func (me *zipCreateFile) Write(input *fuse.WriteIn, nameBytes []byte) (uint32, fuse.Status) {
......
......@@ -180,7 +180,7 @@ func (me *ZipFileFuse) OpenDir(name string) (stream chan fuse.DirEntry, code fus
type ZipFile struct {
data []byte
fuse.DefaultRawFuseFile
fuse.DefaultFuseFile
}
func NewZipFile(f *zip.File) fuse.RawFuseFile {
......
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