Commit 70174818 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Implement GetXAttr in GoUnionFs.

parent 54cbf810
......@@ -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{
......
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment