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
Kirill Smelkov
go-fuse
Commits
4ed8a459
Commit
4ed8a459
authored
Jun 23, 2013
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide DefaultRawFileSystem type to reduce API clutter.
parent
92e2381b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
39 deletions
+43
-39
fuse/api.go
fuse/api.go
+1
-4
fuse/defaultraw.go
fuse/defaultraw.go
+42
-35
No files found.
fuse/api.go
View file @
4ed8a459
...
...
@@ -223,7 +223,7 @@ type MountOptions struct {
// interactions with open files, renames, and threading right etc. are
// somewhat tricky and not very interesting.
//
//
Include DefaultRawFileSystem to inherit a null implementation
.
//
A null implementation is provided by NewDefaultRawFileSystem
.
type
RawFileSystem
interface
{
String
()
string
...
...
@@ -280,9 +280,6 @@ type RawFileSystem interface {
Init
(
params
*
RawFsInit
)
}
// DefaultRawFileSystem returns ENOSYS for every operation.
type
DefaultRawFileSystem
struct
{}
// Talk back to FUSE.
//
// InodeNotify invalidates the information associated with the inode
...
...
fuse/defaultraw.go
View file @
4ed8a459
...
...
@@ -6,135 +6,142 @@ import (
"os"
)
var
_
=
RawFileSystem
((
*
DefaultRawFileSystem
)(
nil
))
// NewDefaultRawFileSystem returns ENOSYS (not implemented) for all
// operations.
func
NewDefaultRawFileSystem
()
RawFileSystem
{
return
&
defaultRawFileSystem
{}
}
type
defaultRawFileSystem
struct
{}
func
(
fs
*
D
efaultRawFileSystem
)
Init
(
init
*
RawFsInit
)
{
func
(
fs
*
d
efaultRawFileSystem
)
Init
(
init
*
RawFsInit
)
{
}
func
(
fs
*
D
efaultRawFileSystem
)
String
()
string
{
func
(
fs
*
d
efaultRawFileSystem
)
String
()
string
{
return
os
.
Args
[
0
]
}
func
(
fs
*
D
efaultRawFileSystem
)
SetDebug
(
dbg
bool
)
{
func
(
fs
*
d
efaultRawFileSystem
)
SetDebug
(
dbg
bool
)
{
}
func
(
fs
*
D
efaultRawFileSystem
)
StatFs
(
out
*
StatfsOut
,
context
*
Context
)
Status
{
func
(
fs
*
d
efaultRawFileSystem
)
StatFs
(
out
*
StatfsOut
,
context
*
Context
)
Status
{
return
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
Lookup
(
out
*
raw
.
EntryOut
,
context
*
Context
,
name
string
)
(
code
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
Lookup
(
out
*
raw
.
EntryOut
,
context
*
Context
,
name
string
)
(
code
Status
)
{
return
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
Forget
(
nodeID
,
nlookup
uint64
)
{
func
(
fs
*
d
efaultRawFileSystem
)
Forget
(
nodeID
,
nlookup
uint64
)
{
}
func
(
fs
*
D
efaultRawFileSystem
)
GetAttr
(
out
*
raw
.
AttrOut
,
context
*
Context
,
input
*
raw
.
GetAttrIn
)
(
code
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
GetAttr
(
out
*
raw
.
AttrOut
,
context
*
Context
,
input
*
raw
.
GetAttrIn
)
(
code
Status
)
{
return
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
Open
(
out
*
raw
.
OpenOut
,
context
*
Context
,
input
*
raw
.
OpenIn
)
(
status
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
Open
(
out
*
raw
.
OpenOut
,
context
*
Context
,
input
*
raw
.
OpenIn
)
(
status
Status
)
{
return
OK
}
func
(
fs
*
D
efaultRawFileSystem
)
SetAttr
(
out
*
raw
.
AttrOut
,
context
*
Context
,
input
*
raw
.
SetAttrIn
)
(
code
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
SetAttr
(
out
*
raw
.
AttrOut
,
context
*
Context
,
input
*
raw
.
SetAttrIn
)
(
code
Status
)
{
return
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
Readlink
(
context
*
Context
)
(
out
[]
byte
,
code
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
Readlink
(
context
*
Context
)
(
out
[]
byte
,
code
Status
)
{
return
nil
,
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
Mknod
(
out
*
raw
.
EntryOut
,
context
*
Context
,
input
*
raw
.
MknodIn
,
name
string
)
(
code
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
Mknod
(
out
*
raw
.
EntryOut
,
context
*
Context
,
input
*
raw
.
MknodIn
,
name
string
)
(
code
Status
)
{
return
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
Mkdir
(
out
*
raw
.
EntryOut
,
context
*
Context
,
input
*
raw
.
MkdirIn
,
name
string
)
(
code
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
Mkdir
(
out
*
raw
.
EntryOut
,
context
*
Context
,
input
*
raw
.
MkdirIn
,
name
string
)
(
code
Status
)
{
return
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
Unlink
(
context
*
Context
,
name
string
)
(
code
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
Unlink
(
context
*
Context
,
name
string
)
(
code
Status
)
{
return
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
Rmdir
(
context
*
Context
,
name
string
)
(
code
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
Rmdir
(
context
*
Context
,
name
string
)
(
code
Status
)
{
return
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
Symlink
(
out
*
raw
.
EntryOut
,
context
*
Context
,
pointedTo
string
,
linkName
string
)
(
code
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
Symlink
(
out
*
raw
.
EntryOut
,
context
*
Context
,
pointedTo
string
,
linkName
string
)
(
code
Status
)
{
return
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
Rename
(
context
*
Context
,
input
*
raw
.
RenameIn
,
oldName
string
,
newName
string
)
(
code
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
Rename
(
context
*
Context
,
input
*
raw
.
RenameIn
,
oldName
string
,
newName
string
)
(
code
Status
)
{
return
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
Link
(
out
*
raw
.
EntryOut
,
context
*
Context
,
input
*
raw
.
LinkIn
,
name
string
)
(
code
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
Link
(
out
*
raw
.
EntryOut
,
context
*
Context
,
input
*
raw
.
LinkIn
,
name
string
)
(
code
Status
)
{
return
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
GetXAttrSize
(
context
*
Context
,
attr
string
)
(
size
int
,
code
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
GetXAttrSize
(
context
*
Context
,
attr
string
)
(
size
int
,
code
Status
)
{
return
0
,
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
GetXAttrData
(
context
*
Context
,
attr
string
)
(
data
[]
byte
,
code
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
GetXAttrData
(
context
*
Context
,
attr
string
)
(
data
[]
byte
,
code
Status
)
{
return
nil
,
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
SetXAttr
(
context
*
Context
,
input
*
raw
.
SetXAttrIn
,
attr
string
,
data
[]
byte
)
Status
{
func
(
fs
*
d
efaultRawFileSystem
)
SetXAttr
(
context
*
Context
,
input
*
raw
.
SetXAttrIn
,
attr
string
,
data
[]
byte
)
Status
{
return
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
ListXAttr
(
context
*
Context
)
(
data
[]
byte
,
code
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
ListXAttr
(
context
*
Context
)
(
data
[]
byte
,
code
Status
)
{
return
nil
,
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
RemoveXAttr
(
context
*
Context
,
attr
string
)
Status
{
func
(
fs
*
d
efaultRawFileSystem
)
RemoveXAttr
(
context
*
Context
,
attr
string
)
Status
{
return
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
Access
(
context
*
Context
,
input
*
raw
.
AccessIn
)
(
code
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
Access
(
context
*
Context
,
input
*
raw
.
AccessIn
)
(
code
Status
)
{
return
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
Create
(
out
*
raw
.
CreateOut
,
context
*
Context
,
input
*
raw
.
CreateIn
,
name
string
)
(
code
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
Create
(
out
*
raw
.
CreateOut
,
context
*
Context
,
input
*
raw
.
CreateIn
,
name
string
)
(
code
Status
)
{
return
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
OpenDir
(
out
*
raw
.
OpenOut
,
context
*
Context
,
input
*
raw
.
OpenIn
)
(
status
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
OpenDir
(
out
*
raw
.
OpenOut
,
context
*
Context
,
input
*
raw
.
OpenIn
)
(
status
Status
)
{
return
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
Read
(
context
*
Context
,
input
*
raw
.
ReadIn
,
buf
[]
byte
)
(
ReadResult
,
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
Read
(
context
*
Context
,
input
*
raw
.
ReadIn
,
buf
[]
byte
)
(
ReadResult
,
Status
)
{
return
&
ReadResultData
{},
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
Release
(
context
*
Context
,
input
*
raw
.
ReleaseIn
)
{
func
(
fs
*
d
efaultRawFileSystem
)
Release
(
context
*
Context
,
input
*
raw
.
ReleaseIn
)
{
}
func
(
fs
*
D
efaultRawFileSystem
)
Write
(
context
*
Context
,
input
*
raw
.
WriteIn
,
data
[]
byte
)
(
written
uint32
,
code
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
Write
(
context
*
Context
,
input
*
raw
.
WriteIn
,
data
[]
byte
)
(
written
uint32
,
code
Status
)
{
return
0
,
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
Flush
(
context
*
Context
,
input
*
raw
.
FlushIn
)
Status
{
func
(
fs
*
d
efaultRawFileSystem
)
Flush
(
context
*
Context
,
input
*
raw
.
FlushIn
)
Status
{
return
OK
}
func
(
fs
*
D
efaultRawFileSystem
)
Fsync
(
context
*
Context
,
input
*
raw
.
FsyncIn
)
(
code
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
Fsync
(
context
*
Context
,
input
*
raw
.
FsyncIn
)
(
code
Status
)
{
return
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
ReadDir
(
l
*
DirEntryList
,
context
*
Context
,
input
*
raw
.
ReadIn
)
Status
{
func
(
fs
*
d
efaultRawFileSystem
)
ReadDir
(
l
*
DirEntryList
,
context
*
Context
,
input
*
raw
.
ReadIn
)
Status
{
return
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
ReleaseDir
(
context
*
Context
,
input
*
raw
.
ReleaseIn
)
{
func
(
fs
*
d
efaultRawFileSystem
)
ReleaseDir
(
context
*
Context
,
input
*
raw
.
ReleaseIn
)
{
}
func
(
fs
*
D
efaultRawFileSystem
)
FsyncDir
(
context
*
Context
,
input
*
raw
.
FsyncIn
)
(
code
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
FsyncDir
(
context
*
Context
,
input
*
raw
.
FsyncIn
)
(
code
Status
)
{
return
ENOSYS
}
func
(
fs
*
D
efaultRawFileSystem
)
Fallocate
(
context
*
Context
,
in
*
raw
.
FallocateIn
)
(
code
Status
)
{
func
(
fs
*
d
efaultRawFileSystem
)
Fallocate
(
context
*
Context
,
in
*
raw
.
FallocateIn
)
(
code
Status
)
{
return
ENOSYS
}
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