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
6e8cfed7
Commit
6e8cfed7
authored
Apr 22, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Style: use &{} rather than new().
parent
b61721ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
fuse/pathfilesystem.go
fuse/pathfilesystem.go
+12
-11
No files found.
fuse/pathfilesystem.go
View file @
6e8cfed7
...
...
@@ -499,7 +499,7 @@ func (me *FileSystemConnector) GetPath(nodeid uint64) (path string, mount *mount
func
(
me
*
FileSystemConnector
)
Init
(
h
*
InHeader
,
input
*
InitIn
)
(
*
InitOut
,
Status
)
{
// TODO ?
return
new
(
InitOut
)
,
OK
return
&
InitOut
{}
,
OK
}
func
(
me
*
FileSystemConnector
)
Destroy
(
h
*
InHeader
,
input
*
InitIn
)
{
...
...
@@ -540,10 +540,10 @@ func (me *FileSystemConnector) internalLookupWithNode(parent *inode, name string
data
.
LookupCount
+=
lookupCount
data
.
Type
=
ModeToType
(
attr
.
Mode
)
out
=
new
(
EntryOut
)
out
.
NodeId
=
data
.
NodeId
out
.
Generation
=
1
// where to get the generation?
out
=
&
EntryOut
{
NodeId
:
data
.
NodeId
,
Generation
:
1
,
// where to get the generation?
}
SplitNs
(
me
.
options
.
EntryTimeout
,
&
out
.
EntryValid
,
&
out
.
EntryValidNsec
)
SplitNs
(
me
.
options
.
AttrTimeout
,
&
out
.
AttrValid
,
&
out
.
AttrValidNsec
)
out
.
Attr
=
*
attr
...
...
@@ -566,8 +566,9 @@ func (me *FileSystemConnector) GetAttr(header *InHeader, input *GetAttrIn) (out
return
nil
,
err
}
out
=
new
(
AttrOut
)
out
.
Attr
=
*
attr
out
=
&
AttrOut
{
Attr
:
*
attr
,
}
out
.
Attr
.
Ino
=
header
.
NodeId
SplitNs
(
me
.
options
.
AttrTimeout
,
&
out
.
AttrValid
,
&
out
.
AttrValidNsec
)
...
...
@@ -585,9 +586,9 @@ func (me *FileSystemConnector) OpenDir(header *InHeader, input *OpenIn) (flags u
return
0
,
0
,
err
}
de
:=
new
(
Dir
)
de
.
stream
=
stream
de
:=
&
Dir
{
stream
:
stream
,
}
h
:=
me
.
registerFile
(
node
,
de
)
return
0
,
h
,
OK
...
...
@@ -651,7 +652,7 @@ func (me *FileSystemConnector) SetAttr(header *InHeader, input *SetAttrIn) (out
}
// TODO - where to get GetAttrIn.Flags / Fh ?
return
me
.
GetAttr
(
header
,
new
(
GetAttrIn
)
)
return
me
.
GetAttr
(
header
,
&
GetAttrIn
{}
)
}
func
(
me
*
FileSystemConnector
)
Readlink
(
header
*
InHeader
)
(
out
[]
byte
,
code
Status
)
{
...
...
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