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
70174818
Commit
70174818
authored
Apr 27, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement GetXAttr in GoUnionFs.
parent
54cbf810
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
unionfs/autounion.go
unionfs/autounion.go
+5
-0
unionfs/unionfs.go
unionfs/unionfs.go
+8
-0
No files found.
unionfs/autounion.go
View file @
70174818
...
...
@@ -118,6 +118,11 @@ func (me *AutoUnionFs) Readlink(path string) (out string, code fuse.Status) {
return
fs
.
Roots
()[
0
],
fuse
.
OK
}
// Must define this, because ENOSYS will suspend all GetXAttr calls.
func
(
me
*
AutoUnionFs
)
GetXAttr
(
name
string
,
attr
string
)
([]
byte
,
fuse
.
Status
)
{
return
nil
,
syscall
.
ENODATA
}
func
(
me
*
AutoUnionFs
)
GetAttr
(
path
string
)
(
*
fuse
.
Attr
,
fuse
.
Status
)
{
if
path
==
""
||
path
==
_CONFIG
||
path
==
_STATUS
{
a
:=
&
fuse
.
Attr
{
...
...
unionfs/unionfs.go
View file @
70174818
...
...
@@ -356,6 +356,14 @@ func (me *UnionFs) GetAttr(name string) (a *fuse.Attr, s fuse.Status) {
return
r
.
attr
,
r
.
code
}
func
(
me
*
UnionFs
)
GetXAttr
(
name
string
,
attr
string
)
([]
byte
,
fuse
.
Status
)
{
branch
:=
me
.
getBranch
(
name
)
if
branch
>=
0
{
return
me
.
fileSystems
[
branch
]
.
GetXAttr
(
name
,
attr
)
}
return
nil
,
fuse
.
ENOENT
}
func
(
me
*
UnionFs
)
OpenDir
(
directory
string
)
(
stream
chan
fuse
.
DirEntry
,
status
fuse
.
Status
)
{
dirBranch
:=
me
.
getBranch
(
directory
)
if
dirBranch
<
0
{
...
...
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