Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Levin Zimmermann
go-fuse
Commits
ca24733f
Commit
ca24733f
authored
Apr 21, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename DefaultRawFuseFile to DefaultFuseFile.
parent
d2f8777d
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
13 additions
and
27 deletions
+13
-27
fuse/datafile.go
fuse/datafile.go
+1
-1
fuse/default.go
fuse/default.go
+6
-6
fuse/default_test.go
fuse/default_test.go
+1
-1
fuse/devnull.go
fuse/devnull.go
+1
-1
fuse/fuse.go
fuse/fuse.go
+0
-14
fuse/loopback.go
fuse/loopback.go
+1
-1
fuse/types.go
fuse/types.go
+1
-1
zipfs/multizip.go
zipfs/multizip.go
+1
-1
zipfs/zipfs.go
zipfs/zipfs.go
+1
-1
No files found.
fuse/datafile.go
View file @
ca24733f
...
...
@@ -5,7 +5,7 @@ package fuse
type
ReadOnlyFile
struct
{
data
[]
byte
Default
Raw
FuseFile
DefaultFuseFile
}
func
NewReadOnlyFile
(
data
[]
byte
)
*
ReadOnlyFile
{
...
...
fuse/default.go
View file @
ca24733f
...
...
@@ -137,25 +137,25 @@ func (me *DefaultRawFuseFileSystem) FsyncDir(header *InHeader, input *FsyncIn) (
////////////////////////////////////////////////////////////////
// Default
Raw
FuseFile
// DefaultFuseFile
func
(
me
*
Default
Raw
FuseFile
)
Read
(
*
ReadIn
,
*
BufferPool
)
([]
byte
,
Status
)
{
func
(
me
*
DefaultFuseFile
)
Read
(
*
ReadIn
,
*
BufferPool
)
([]
byte
,
Status
)
{
return
[]
byte
(
""
),
ENOSYS
}
func
(
me
*
Default
Raw
FuseFile
)
Write
(
*
WriteIn
,
[]
byte
)
(
uint32
,
Status
)
{
func
(
me
*
DefaultFuseFile
)
Write
(
*
WriteIn
,
[]
byte
)
(
uint32
,
Status
)
{
return
0
,
ENOSYS
}
func
(
me
*
Default
Raw
FuseFile
)
Flush
()
Status
{
func
(
me
*
DefaultFuseFile
)
Flush
()
Status
{
return
ENOSYS
}
func
(
me
*
Default
Raw
FuseFile
)
Release
()
{
func
(
me
*
DefaultFuseFile
)
Release
()
{
}
func
(
me
*
Default
Raw
FuseFile
)
Fsync
(
*
FsyncIn
)
(
code
Status
)
{
func
(
me
*
DefaultFuseFile
)
Fsync
(
*
FsyncIn
)
(
code
Status
)
{
return
ENOSYS
}
...
...
fuse/default_test.go
View file @
ca24733f
...
...
@@ -27,7 +27,7 @@ func TestPathFs(t *testing.T) {
}
func
TestDummyFile
(
t
*
testing
.
T
)
{
d
:=
new
(
Default
Raw
FuseFile
)
d
:=
new
(
DefaultFuseFile
)
var
filePtr
RawFuseFile
=
d
_
=
filePtr
}
fuse/devnull.go
View file @
ca24733f
...
...
@@ -2,7 +2,7 @@ package fuse
// A FUSE file that accepts any write, and always returns EOF.
type
DevNullFile
struct
{
Default
Raw
FuseFile
DefaultFuseFile
}
func
NewDevNullFile
()
*
DevNullFile
{
...
...
fuse/fuse.go
View file @
ca24733f
...
...
@@ -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
()
...
...
fuse/loopback.go
View file @
ca24733f
...
...
@@ -175,7 +175,7 @@ func (me *LoopbackFileSystem) FillOptions(options *PathFileSystemConnectorOption
type
LoopbackFile
struct
{
file
*
os
.
File
Default
Raw
FuseFile
DefaultFuseFile
}
func
(
me
*
LoopbackFile
)
Read
(
input
*
ReadIn
,
buffers
*
BufferPool
)
([]
byte
,
Status
)
{
...
...
fuse/types.go
View file @
ca24733f
...
...
@@ -598,5 +598,5 @@ type PathFilesystem interface {
type
DefaultRawFuseDir
struct
{}
type
DefaultPathFilesystem
struct
{}
type
Default
Raw
FuseFile
struct
{}
type
DefaultFuseFile
struct
{}
type
DefaultRawFuseFileSystem
struct
{}
zipfs/multizip.go
View file @
ca24733f
...
...
@@ -31,7 +31,7 @@ type zipCreateFile struct {
Basename
string
zfs
*
MultiZipFs
fuse
.
Default
Raw
FuseFile
fuse
.
DefaultFuseFile
}
func
(
me
*
zipCreateFile
)
Write
(
input
*
fuse
.
WriteIn
,
nameBytes
[]
byte
)
(
uint32
,
fuse
.
Status
)
{
...
...
zipfs/zipfs.go
View file @
ca24733f
...
...
@@ -180,7 +180,7 @@ func (me *ZipFileFuse) OpenDir(name string) (stream chan fuse.DirEntry, code fus
type
ZipFile
struct
{
data
[]
byte
fuse
.
Default
Raw
FuseFile
fuse
.
DefaultFuseFile
}
func
NewZipFile
(
f
*
zip
.
File
)
fuse
.
RawFuseFile
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment