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
65f5a7a5
Commit
65f5a7a5
authored
Sep 11, 2023
by
Han-Wen Nienhuys
Committed by
Han-Wen Nienhuys
Sep 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fs: correct documentation on return errno codes
Change-Id: Ia1e8e20f5646a0958f4ede5cf20f565c63f0bb7f
parent
043296a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
fs/api.go
fs/api.go
+8
-8
fs/bridge.go
fs/bridge.go
+4
-0
No files found.
fs/api.go
View file @
65f5a7a5
...
...
@@ -233,7 +233,7 @@ type NodeGetattrer interface {
Getattr
(
ctx
context
.
Context
,
f
FileHandle
,
out
*
fuse
.
AttrOut
)
syscall
.
Errno
}
// SetAttr sets attributes for an Inode.
// SetAttr sets attributes for an Inode.
Default is to return ENOTSUP.
type
NodeSetattrer
interface
{
Setattr
(
ctx
context
.
Context
,
f
FileHandle
,
in
*
fuse
.
SetAttrIn
,
out
*
fuse
.
AttrOut
)
syscall
.
Errno
}
...
...
@@ -435,25 +435,25 @@ type NodeReaddirer interface {
}
// Mkdir is similar to Lookup, but must create a directory entry and Inode.
// Default is to return E
ROFS
.
// Default is to return E
NOTSUP
.
type
NodeMkdirer
interface
{
Mkdir
(
ctx
context
.
Context
,
name
string
,
mode
uint32
,
out
*
fuse
.
EntryOut
)
(
*
Inode
,
syscall
.
Errno
)
}
// Mknod is similar to Lookup, but must create a device entry and Inode.
// Default is to return E
ROFS
.
// Default is to return E
NOTSUP
.
type
NodeMknoder
interface
{
Mknod
(
ctx
context
.
Context
,
name
string
,
mode
uint32
,
dev
uint32
,
out
*
fuse
.
EntryOut
)
(
*
Inode
,
syscall
.
Errno
)
}
// Link is similar to Lookup, but must create a new link to an existing Inode.
// Default is to return E
ROFS
.
// Default is to return E
NOTSUP
.
type
NodeLinker
interface
{
Link
(
ctx
context
.
Context
,
target
InodeEmbedder
,
name
string
,
out
*
fuse
.
EntryOut
)
(
node
*
Inode
,
errno
syscall
.
Errno
)
}
// Symlink is similar to Lookup, but must create a new symbolic link.
// Default is to return E
ROFS
.
// Default is to return E
NOTSUP
.
type
NodeSymlinker
interface
{
Symlink
(
ctx
context
.
Context
,
target
,
name
string
,
out
*
fuse
.
EntryOut
)
(
node
*
Inode
,
errno
syscall
.
Errno
)
}
...
...
@@ -468,20 +468,20 @@ type NodeCreater interface {
// Unlink should remove a child from this directory. If the
// return status is OK, the Inode is removed as child in the
// FS tree automatically. Default is to return
EROFS
.
// FS tree automatically. Default is to return
success
.
type
NodeUnlinker
interface
{
Unlink
(
ctx
context
.
Context
,
name
string
)
syscall
.
Errno
}
// Rmdir is like Unlink but for directories.
// Default is to return
EROFS
.
// Default is to return
success
.
type
NodeRmdirer
interface
{
Rmdir
(
ctx
context
.
Context
,
name
string
)
syscall
.
Errno
}
// Rename should move a child from one directory to a different
// one. The change is effected in the FS tree if the return status is
// OK. Default is to return E
ROFS
.
// OK. Default is to return E
NOTSUP
.
type
NodeRenamer
interface
{
Rename
(
ctx
context
.
Context
,
name
string
,
newParent
InodeEmbedder
,
newName
string
,
flags
uint32
)
syscall
.
Errno
}
...
...
fs/bridge.go
View file @
65f5a7a5
...
...
@@ -378,6 +378,8 @@ func (b *rawBridge) Rmdir(cancel <-chan struct{}, header *fuse.InHeader, name st
errno
=
mops
.
Rmdir
(
&
fuse
.
Context
{
Caller
:
header
.
Caller
,
Cancel
:
cancel
},
name
)
}
// TODO - this should not succeed silently.
if
errno
==
0
{
parent
.
RmChild
(
name
)
}
...
...
@@ -391,6 +393,8 @@ func (b *rawBridge) Unlink(cancel <-chan struct{}, header *fuse.InHeader, name s
errno
=
mops
.
Unlink
(
&
fuse
.
Context
{
Caller
:
header
.
Caller
,
Cancel
:
cancel
},
name
)
}
// TODO - this should not succeed silently.
if
errno
==
0
{
parent
.
RmChild
(
name
)
}
...
...
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