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
d25a1333
Commit
d25a1333
authored
Jun 30, 2013
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse: for readdirplus, use lookup inode number in the DirEntry inode field.
parent
23d23803
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
fuse/direntry.go
fuse/direntry.go
+8
-1
No files found.
fuse/direntry.go
View file @
d25a1333
...
...
@@ -30,6 +30,8 @@ type DirEntryList struct {
offset
uint64
}
// NewDirEntryList creates a DirEntryList with the given data buffer
// and offset.
func
NewDirEntryList
(
data
[]
byte
,
off
uint64
)
*
DirEntryList
{
return
&
DirEntryList
{
buf
:
data
[
:
0
],
...
...
@@ -79,9 +81,14 @@ func (l *DirEntryList) Add(prefix []byte, name string, inode uint64, mode uint32
// and its corresponding lookup. Pass a null EntryOut if the lookup
// data should be ignored.
func
(
l
*
DirEntryList
)
AddDirLookupEntry
(
e
DirEntry
,
entryOut
*
raw
.
EntryOut
)
(
bool
,
uint64
)
{
ino
:=
uint64
(
raw
.
FUSE_UNKNOWN_INO
)
if
entryOut
.
Ino
>
0
{
ino
=
entryOut
.
Ino
}
var
lookup
[]
byte
toSlice
(
&
lookup
,
unsafe
.
Pointer
(
entryOut
),
unsafe
.
Sizeof
(
raw
.
EntryOut
{}))
return
l
.
Add
(
lookup
,
e
.
Name
,
uint64
(
raw
.
FUSE_UNKNOWN_INO
),
e
.
Mode
)
return
l
.
Add
(
lookup
,
e
.
Name
,
ino
,
e
.
Mode
)
}
func
(
l
*
DirEntryList
)
bytes
()
[]
byte
{
...
...
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