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
3ec3a570
Commit
3ec3a570
authored
Apr 02, 2012
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move DirEnt to raw.
parent
58233848
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
fuse/direntry.go
fuse/direntry.go
+4
-3
fuse/types.go
fuse/types.go
+0
-6
raw/types.go
raw/types.go
+7
-0
No files found.
fuse/direntry.go
View file @
3ec3a570
...
...
@@ -12,7 +12,8 @@ import (
var
_
=
fmt
.
Print
// For FileSystemConnector. The connector determines inodes.
// DirEntry is a type for PathFileSystem and NodeFileSystem to return
// directory contents in.
type
DirEntry
struct
{
Mode
uint32
Name
string
...
...
@@ -40,14 +41,14 @@ func (me *DirEntryList) Add(name []byte, inode uint64, mode uint32) bool {
lastLen
:=
me
.
buf
.
Len
()
(
*
me
.
offset
)
++
dirent
:=
Dirent
{
dirent
:=
raw
.
Dirent
{
Off
:
*
me
.
offset
,
Ino
:
inode
,
NameLen
:
uint32
(
len
(
name
)),
Typ
:
ModeToType
(
mode
),
}
_
,
err
:=
me
.
buf
.
Write
(
asSlice
(
unsafe
.
Pointer
(
&
dirent
),
unsafe
.
Sizeof
(
Dirent
{})))
_
,
err
:=
me
.
buf
.
Write
(
asSlice
(
unsafe
.
Pointer
(
&
dirent
),
unsafe
.
Sizeof
(
raw
.
Dirent
{})))
if
err
!=
nil
{
panic
(
"Serialization of Dirent failed"
)
}
...
...
fuse/types.go
View file @
3ec3a570
...
...
@@ -79,9 +79,3 @@ type WriteIn struct {
Padding
uint32
}
type
Dirent
struct
{
Ino
uint64
Off
uint64
NameLen
uint32
Typ
uint32
}
raw/types.go
View file @
3ec3a570
...
...
@@ -385,3 +385,10 @@ type Kstatfs struct {
type
StatfsOut
struct
{
Kstatfs
}
type
Dirent
struct
{
Ino
uint64
Off
uint64
NameLen
uint32
Typ
uint32
}
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