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
ab26406a
Commit
ab26406a
authored
Mar 22, 2019
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nodefs: return []byte in Readlink
parent
b423903e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
nodefs/api.go
nodefs/api.go
+1
-1
nodefs/bridge.go
nodefs/bridge.go
+1
-1
nodefs/default.go
nodefs/default.go
+2
-2
nodefs/loopback.go
nodefs/loopback.go
+3
-3
No files found.
nodefs/api.go
View file @
ab26406a
...
...
@@ -129,7 +129,7 @@ type SymlinkOperations interface {
Operations
// Readlink reads the content of a symlink.
Readlink
(
ctx
context
.
Context
)
(
string
,
fuse
.
Status
)
Readlink
(
ctx
context
.
Context
)
(
[]
byte
,
fuse
.
Status
)
}
// FileOperations holds operations that apply to regular files. The
...
...
nodefs/bridge.go
View file @
ab26406a
...
...
@@ -441,7 +441,7 @@ func (b *rawBridge) Readlink(cancel <-chan struct{}, header *fuse.InHeader) (out
return
nil
,
status
}
return
[]
byte
(
result
)
,
fuse
.
OK
return
result
,
fuse
.
OK
}
func
(
b
*
rawBridge
)
Access
(
cancel
<-
chan
struct
{},
input
*
fuse
.
AccessIn
)
(
status
fuse
.
Status
)
{
...
...
nodefs/default.go
View file @
ab26406a
...
...
@@ -175,8 +175,8 @@ func (n *DefaultOperations) Symlink(ctx context.Context, target, name string, ou
}
// Readlink return ENOTSUP
func
(
n
*
DefaultOperations
)
Readlink
(
ctx
context
.
Context
)
(
string
,
fuse
.
Status
)
{
return
""
,
fuse
.
ENOTSUP
func
(
n
*
DefaultOperations
)
Readlink
(
ctx
context
.
Context
)
(
[]
byte
,
fuse
.
Status
)
{
return
nil
,
fuse
.
ENOTSUP
}
// Fsync delegates to the FileHandle
...
...
nodefs/loopback.go
View file @
ab26406a
...
...
@@ -223,18 +223,18 @@ func (n *loopbackNode) Link(ctx context.Context, target Operations, name string,
return
ch
,
fuse
.
OK
}
func
(
n
*
loopbackNode
)
Readlink
(
ctx
context
.
Context
)
(
string
,
fuse
.
Status
)
{
func
(
n
*
loopbackNode
)
Readlink
(
ctx
context
.
Context
)
(
[]
byte
,
fuse
.
Status
)
{
p
:=
n
.
path
()
for
l
:=
256
;
;
l
*=
2
{
buf
:=
make
([]
byte
,
l
)
sz
,
err
:=
syscall
.
Readlink
(
p
,
buf
)
if
err
!=
nil
{
return
""
,
fuse
.
ToStatus
(
err
)
return
nil
,
fuse
.
ToStatus
(
err
)
}
if
sz
<
len
(
buf
)
{
return
string
(
buf
[
:
sz
])
,
fuse
.
OK
return
buf
[
:
sz
]
,
fuse
.
OK
}
}
}
...
...
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