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
ad7c4c71
Commit
ad7c4c71
authored
Sep 07, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add context argument to FsNode.Lookup.
parent
ffe787c4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
7 deletions
+6
-7
fuse/api.go
fuse/api.go
+1
-1
fuse/defaultnode.go
fuse/defaultnode.go
+1
-1
fuse/fsops.go
fuse/fsops.go
+1
-1
fuse/pathfs.go
fuse/pathfs.go
+2
-3
zipfs/memtree.go
zipfs/memtree.go
+1
-1
No files found.
fuse/api.go
View file @
ad7c4c71
...
...
@@ -33,7 +33,7 @@ type FsNode interface {
RmChild
(
name
string
,
child
FsNode
)
AddChild
(
name
string
,
child
FsNode
)
Lookup
(
name
string
)
(
fi
*
os
.
FileInfo
,
node
FsNode
,
code
Status
)
Lookup
(
name
string
,
context
*
Context
)
(
fi
*
os
.
FileInfo
,
node
FsNode
,
code
Status
)
OnForget
()
// Misc.
...
...
fuse/defaultnode.go
View file @
ad7c4c71
...
...
@@ -49,7 +49,7 @@ func (me *DefaultFsNode) RmChild(name string, child FsNode) {
func
(
me
*
DefaultFsNode
)
AddChild
(
name
string
,
child
FsNode
)
{
}
func
(
me
*
DefaultFsNode
)
Lookup
(
name
string
)
(
fi
*
os
.
FileInfo
,
node
FsNode
,
code
Status
)
{
func
(
me
*
DefaultFsNode
)
Lookup
(
name
string
,
context
*
Context
)
(
fi
*
os
.
FileInfo
,
node
FsNode
,
code
Status
)
{
return
nil
,
nil
,
ENOSYS
}
...
...
fuse/fsops.go
View file @
ad7c4c71
...
...
@@ -54,7 +54,7 @@ func (me *FileSystemConnector) internalLookup(parent *Inode, name string, contex
if
getattrNode
!=
nil
{
fi
,
code
=
getattrNode
.
fsInode
.
GetAttr
(
nil
,
nil
)
}
else
if
lookupNode
!=
nil
{
fi
,
fsNode
,
code
=
parent
.
fsInode
.
Lookup
(
name
)
fi
,
fsNode
,
code
=
parent
.
fsInode
.
Lookup
(
name
,
context
)
}
return
me
.
postLookup
(
fi
,
fsNode
,
code
,
getattrNode
,
lookupNode
,
name
)
...
...
fuse/pathfs.go
View file @
ad7c4c71
...
...
@@ -344,10 +344,9 @@ func (me *pathInode) Open(flags uint32, context *Context) (file File, code Statu
return
me
.
fs
.
Open
(
me
.
GetPath
(),
flags
,
context
)
}
// TOOD - need context.
func
(
me
*
pathInode
)
Lookup
(
name
string
)
(
fi
*
os
.
FileInfo
,
node
FsNode
,
code
Status
)
{
func
(
me
*
pathInode
)
Lookup
(
name
string
,
context
*
Context
)
(
fi
*
os
.
FileInfo
,
node
FsNode
,
code
Status
)
{
fullPath
:=
filepath
.
Join
(
me
.
GetPath
(),
name
)
fi
,
code
=
me
.
fs
.
GetAttr
(
fullPath
,
nil
)
fi
,
code
=
me
.
fs
.
GetAttr
(
fullPath
,
context
)
if
code
.
Ok
()
{
node
=
me
.
findChild
(
fi
.
Ino
,
name
)
}
...
...
zipfs/memtree.go
View file @
ad7c4c71
...
...
@@ -63,7 +63,7 @@ func (me *memNode) Print(indent int) {
}
// We construct the tree at mount, so we never need to look anything up.
func
(
me
*
memNode
)
Lookup
(
name
string
)
(
fi
*
os
.
FileInfo
,
node
fuse
.
FsNode
,
code
fuse
.
Status
)
{
func
(
me
*
memNode
)
Lookup
(
name
string
,
c
*
fuse
.
Context
)
(
fi
*
os
.
FileInfo
,
node
fuse
.
FsNode
,
code
fuse
.
Status
)
{
return
nil
,
nil
,
fuse
.
ENOENT
}
...
...
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