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
d98de7e2
Commit
d98de7e2
authored
May 24, 2012
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanups for XAttr functions.
parent
03081e9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
fuse/opcode.go
fuse/opcode.go
+15
-8
No files found.
fuse/opcode.go
View file @
d98de7e2
...
@@ -160,23 +160,28 @@ func doGetXAttr(state *MountState, req *request) {
...
@@ -160,23 +160,28 @@ func doGetXAttr(state *MountState, req *request) {
}
}
input
:=
(
*
raw
.
GetXAttrIn
)(
req
.
inData
)
input
:=
(
*
raw
.
GetXAttrIn
)(
req
.
inData
)
var
data
[]
byte
switch
{
if
req
.
inHeader
.
Opcode
==
_OP_GETXATTR
&&
input
.
Size
==
0
{
case
req
.
inHeader
.
Opcode
==
_OP_GETXATTR
&&
input
.
Size
==
0
:
out
:=
(
*
raw
.
GetXAttrOut
)(
req
.
outData
)
out
:=
(
*
raw
.
GetXAttrOut
)(
req
.
outData
)
sz
,
code
:=
state
.
fileSystem
.
GetXAttrSize
(
req
.
inHeader
,
req
.
filenames
[
0
])
sz
,
code
:=
state
.
fileSystem
.
GetXAttrSize
(
req
.
inHeader
,
req
.
filenames
[
0
])
if
code
.
Ok
()
{
if
code
.
Ok
()
{
out
.
Size
=
uint32
(
sz
)
out
.
Size
=
uint32
(
sz
)
req
.
status
=
ERANGE
req
.
status
=
ERANGE
return
}
}
req
.
status
=
code
req
.
status
=
code
case
req
.
inHeader
.
Opcode
==
_OP_GETXATTR
:
return
req
.
outData
=
nil
}
req
.
outData
=
nil
var
data
[]
byte
switch
req
.
inHeader
.
Opcode
{
case
_OP_GETXATTR
:
data
,
req
.
status
=
state
.
fileSystem
.
GetXAttrData
(
req
.
inHeader
,
req
.
filenames
[
0
])
data
,
req
.
status
=
state
.
fileSystem
.
GetXAttrData
(
req
.
inHeader
,
req
.
filenames
[
0
])
default
:
case
_OP_LISTXATTR
:
req
.
outData
=
nil
data
,
req
.
status
=
state
.
fileSystem
.
ListXAttr
(
req
.
inHeader
)
data
,
req
.
status
=
state
.
fileSystem
.
ListXAttr
(
req
.
inHeader
)
default
:
log
.
Panicf
(
"xattr opcode %v"
,
req
.
inHeader
.
Opcode
)
req
.
status
=
ENOSYS
}
}
if
len
(
data
)
>
int
(
input
.
Size
)
{
if
len
(
data
)
>
int
(
input
.
Size
)
{
...
@@ -511,6 +516,8 @@ func init() {
...
@@ -511,6 +516,8 @@ func init() {
for
op
,
f
:=
range
map
[
int32
]
castPointerFunc
{
for
op
,
f
:=
range
map
[
int32
]
castPointerFunc
{
_OP_FLUSH
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
FlushIn
)(
ptr
)
},
_OP_FLUSH
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
FlushIn
)(
ptr
)
},
_OP_GETATTR
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
GetAttrIn
)(
ptr
)
},
_OP_GETATTR
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
GetAttrIn
)(
ptr
)
},
_OP_GETXATTR
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
GetXAttrIn
)(
ptr
)
},
_OP_LISTXATTR
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
GetXAttrIn
)(
ptr
)
},
_OP_SETATTR
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
SetAttrIn
)(
ptr
)
},
_OP_SETATTR
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
SetAttrIn
)(
ptr
)
},
_OP_INIT
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
InitIn
)(
ptr
)
},
_OP_INIT
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
InitIn
)(
ptr
)
},
_OP_IOCTL
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
IoctlIn
)(
ptr
)
},
_OP_IOCTL
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
raw
.
IoctlIn
)(
ptr
)
},
...
...
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