Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-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
jacobsa-fuse
Commits
ba719912
Commit
ba719912
authored
Jun 05, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed hellofs.
parent
ea1d0606
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
28 deletions
+7
-28
samples/hellofs/hello_fs.go
samples/hellofs/hello_fs.go
+7
-28
No files found.
samples/hellofs/hello_fs.go
View file @
ba719912
...
...
@@ -147,17 +147,11 @@ func (fs *helloFS) patchAttributes(
attr
.
Crtime
=
now
}
func
(
fs
*
helloFS
)
Init
(
op
*
fuseops
.
InitOp
)
{
var
err
error
defer
fuseutil
.
RespondToOp
(
op
,
&
err
)
func
(
fs
*
helloFS
)
Init
(
op
*
fuseops
.
InitOp
)
(
err
error
)
{
return
}
func
(
fs
*
helloFS
)
LookUpInode
(
op
*
fuseops
.
LookUpInodeOp
)
{
var
err
error
defer
fuseutil
.
RespondToOp
(
op
,
&
err
)
func
(
fs
*
helloFS
)
LookUpInode
(
op
*
fuseops
.
LookUpInodeOp
)
(
err
error
)
{
// Find the info for the parent.
parentInfo
,
ok
:=
gInodeInfo
[
op
.
Parent
]
if
!
ok
{
...
...
@@ -182,10 +176,7 @@ func (fs *helloFS) LookUpInode(op *fuseops.LookUpInodeOp) {
}
func
(
fs
*
helloFS
)
GetInodeAttributes
(
op
*
fuseops
.
GetInodeAttributesOp
)
{
var
err
error
defer
fuseutil
.
RespondToOp
(
op
,
&
err
)
op
*
fuseops
.
GetInodeAttributesOp
)
(
err
error
)
{
// Find the info for this inode.
info
,
ok
:=
gInodeInfo
[
op
.
Inode
]
if
!
ok
{
...
...
@@ -203,19 +194,13 @@ func (fs *helloFS) GetInodeAttributes(
}
func
(
fs
*
helloFS
)
OpenDir
(
op
*
fuseops
.
OpenDirOp
)
{
var
err
error
defer
fuseutil
.
RespondToOp
(
op
,
&
err
)
op
*
fuseops
.
OpenDirOp
)
(
err
error
)
{
// Allow opening any directory.
return
}
func
(
fs
*
helloFS
)
ReadDir
(
op
*
fuseops
.
ReadDirOp
)
{
var
err
error
defer
fuseutil
.
RespondToOp
(
op
,
&
err
)
op
*
fuseops
.
ReadDirOp
)
(
err
error
)
{
// Find the info for this inode.
info
,
ok
:=
gInodeInfo
[
op
.
Inode
]
if
!
ok
{
...
...
@@ -251,19 +236,13 @@ func (fs *helloFS) ReadDir(
}
func
(
fs
*
helloFS
)
OpenFile
(
op
*
fuseops
.
OpenFileOp
)
{
var
err
error
defer
fuseutil
.
RespondToOp
(
op
,
&
err
)
op
*
fuseops
.
OpenFileOp
)
(
err
error
)
{
// Allow opening any file.
return
}
func
(
fs
*
helloFS
)
ReadFile
(
op
*
fuseops
.
ReadFileOp
)
{
var
err
error
defer
fuseutil
.
RespondToOp
(
op
,
&
err
)
op
*
fuseops
.
ReadFileOp
)
(
err
error
)
{
// Let io.ReaderAt deal with the semantics.
reader
:=
strings
.
NewReader
(
"Hello, world!"
)
...
...
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