Commit 3aed656d authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Drop Kstatfs type.

parent 8342bc7b
// 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
......
......@@ -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,
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment