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
8c95f091
Commit
8c95f091
authored
Nov 13, 2012
by
Adam Goode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix listxattr to return size when len==0
This fixes getfattr(1) which otherwise fails with ERANGE.
parent
1adb5bd3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
fuse/opcode.go
fuse/opcode.go
+16
-7
No files found.
fuse/opcode.go
View file @
8c95f091
...
...
@@ -173,15 +173,24 @@ func doGetXAttr(state *MountState, req *request) {
input
:=
(
*
raw
.
GetXAttrIn
)(
req
.
inData
)
if
req
.
inHeader
.
Opcode
==
_OP_GETXATTR
&&
input
.
Size
==
0
{
if
input
.
Size
==
0
{
out
:=
(
*
raw
.
GetXAttrOut
)(
req
.
outData
)
switch
req
.
inHeader
.
Opcode
{
case
_OP_GETXATTR
:
sz
,
code
:=
state
.
fileSystem
.
GetXAttrSize
(
req
.
inHeader
,
req
.
filenames
[
0
])
if
code
.
Ok
()
{
out
.
Size
=
uint32
(
sz
)
req
.
status
=
ERANGE
}
req
.
status
=
code
return
case
_OP_LISTXATTR
:
data
,
code
:=
state
.
fileSystem
.
ListXAttr
(
req
.
inHeader
)
if
code
.
Ok
()
{
out
.
Size
=
uint32
(
len
(
data
))
}
req
.
status
=
code
return
}
}
req
.
outData
=
nil
...
...
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