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
c749c652
Commit
c749c652
authored
Apr 14, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add DevNull file.
parent
dd0c60b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
1 deletion
+29
-1
fuse/Makefile
fuse/Makefile
+2
-1
fuse/default_test.go
fuse/default_test.go
+1
-0
fuse/devnull.go
fuse/devnull.go
+26
-0
No files found.
fuse/Makefile
View file @
c749c652
...
...
@@ -18,7 +18,8 @@ GOFILES=misc.go\
wrappedfs.go
\
timingfs.go
\
timingrawfs.go
\
xattr.go
xattr.go
\
devnull.go
\
include
$(GOROOT)/src/Make.pkg
fuse/default_test.go
View file @
c749c652
...
...
@@ -35,3 +35,4 @@ func TestDummyFile(t *testing.T) {
_
=
fileDir
_
=
filePtr
}
fuse/devnull.go
0 → 100644
View file @
c749c652
package
fuse
// A FUSE file that accepts any write, and always returns EOF.
type
DevNullFile
struct
{
DefaultRawFuseFile
}
func
NewDevNullFile
()
*
DevNullFile
{
return
new
(
DevNullFile
)
}
func
(
me
*
DevNullFile
)
Read
(
input
*
ReadIn
,
bp
*
BufferPool
)
([]
byte
,
Status
)
{
return
[]
byte
{},
OK
}
func
(
me
*
DevNullFile
)
Write
(
input
*
WriteIn
,
content
[]
byte
)
(
uint32
,
Status
)
{
return
uint32
(
len
(
content
)),
OK
}
func
(
me
*
DevNullFile
)
Flush
()
Status
{
return
OK
}
func
(
me
*
DevNullFile
)
Fsync
(
*
FsyncIn
)
(
code
Status
)
{
return
OK
}
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