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
3aed656d
Commit
3aed656d
authored
May 27, 2012
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop Kstatfs type.
parent
8342bc7b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
23 deletions
+13
-23
fuse/loopback.go
fuse/loopback.go
+11
-17
raw/print.go
raw/print.go
+1
-1
raw/types.go
raw/types.go
+1
-5
No files found.
fuse/loopback.go
View file @
3aed656d
// A FUSE filesystem that shunts all request to an underlying file
// system. Its main purpose is to provide test coverage without
// having to build an actual synthetic filesystem.
package
fuse
import
(
...
...
@@ -12,16 +8,16 @@ import (
"path/filepath"
"syscall"
"time"
"github.com/hanwen/go-fuse/raw"
)
var
_
=
fmt
.
Println
var
_
=
log
.
Println
// A FUSE filesystem that shunts all request to an underlying file
// system. Its main purpose is to provide test coverage without
// having to build an actual synthetic filesystem.
type
LoopbackFileSystem
struct
{
Root
string
DefaultFileSystem
}
...
...
@@ -188,16 +184,14 @@ func (fs *LoopbackFileSystem) StatFs(name string) *StatfsOut {
err
:=
syscall
.
Statfs
(
fs
.
GetPath
(
name
),
&
s
)
if
err
==
nil
{
return
&
StatfsOut
{
raw
.
Kstatfs
{
Blocks
:
s
.
Blocks
,
Bsize
:
uint32
(
s
.
Bsize
),
Bfree
:
s
.
Bfree
,
Bavail
:
s
.
Bavail
,
Files
:
s
.
Files
,
Ffree
:
s
.
Ffree
,
Frsize
:
uint32
(
s
.
Frsize
),
NameLen
:
uint32
(
s
.
Namelen
),
},
Blocks
:
s
.
Blocks
,
Bsize
:
uint32
(
s
.
Bsize
),
Bfree
:
s
.
Bfree
,
Bavail
:
s
.
Bavail
,
Files
:
s
.
Files
,
Ffree
:
s
.
Ffree
,
Frsize
:
uint32
(
s
.
Frsize
),
NameLen
:
uint32
(
s
.
Namelen
),
}
}
return
nil
...
...
raw/print.go
View file @
3aed656d
...
...
@@ -207,7 +207,7 @@ func (me *CreateOut) String() string {
return
fmt
.
Sprintf
(
"{%v %v}"
,
&
me
.
EntryOut
,
&
me
.
OpenOut
)
}
func
(
me
*
Kstatfs
)
String
()
string
{
func
(
me
*
StatfsOut
)
String
()
string
{
return
fmt
.
Sprintf
(
"{b%d f%d fs%d ff%d bs%d nl%d frs%d}"
,
me
.
Blocks
,
me
.
Bfree
,
me
.
Bavail
,
me
.
Files
,
me
.
Ffree
,
...
...
raw/types.go
View file @
3aed656d
...
...
@@ -366,7 +366,7 @@ type InHeader struct {
Padding
uint32
}
type
Kstatfs
struct
{
type
StatfsOut
struct
{
Blocks
uint64
Bfree
uint64
Bavail
uint64
...
...
@@ -379,10 +379,6 @@ type Kstatfs struct {
Spare
[
6
]
uint32
}
type
StatfsOut
struct
{
Kstatfs
}
type
Dirent
struct
{
Ino
uint64
Off
uint64
...
...
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