Commit 62df4e52 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

fuse/pathfs: Fix StatfsOut location.

parent c56ebf90
......@@ -65,7 +65,7 @@ type FileSystem interface {
Symlink(value string, linkName string, context *fuse.Context) (code fuse.Status)
Readlink(name string, context *fuse.Context) (string, fuse.Status)
StatFs(name string) *nodefs.StatfsOut
StatFs(name string) *fuse.StatfsOut
}
type PathNodeFsOptions struct {
......
......@@ -111,6 +111,6 @@ func (fs *defaultFileSystem) String() string {
return "defaultFileSystem"
}
func (fs *defaultFileSystem) StatFs(name string) *nodefs.StatfsOut {
func (fs *defaultFileSystem) StatFs(name string) *fuse.StatfsOut {
return nil
}
......@@ -28,7 +28,7 @@ func (fs *lockingFileSystem) String() string {
return fs.FS.String()
}
func (fs *lockingFileSystem) StatFs(name string) *nodefs.StatfsOut {
func (fs *lockingFileSystem) StatFs(name string) *fuse.StatfsOut {
defer fs.locked()()
return fs.FS.StatFs(name)
}
......
......@@ -5,14 +5,13 @@ import (
"syscall"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
)
func (fs *loopbackFileSystem) StatFs(name string) *nodefs.StatfsOut {
func (fs *loopbackFileSystem) StatFs(name string) *fuse.StatfsOut {
s := syscall.Statfs_t{}
err := syscall.Statfs(fs.GetPath(name), &s)
if err == nil {
return &nodefs.StatfsOut{
return &fuse.StatfsOut{
Blocks: s.Blocks,
Bsize: uint32(s.Bsize),
Bfree: s.Bfree,
......
......@@ -377,7 +377,7 @@ func (n *pathInode) OnForget() {
////////////////////////////////////////////////////////////////
// FS operations
func (n *pathInode) StatFs() *nodefs.StatfsOut {
func (n *pathInode) StatFs() *fuse.StatfsOut {
return n.fs.StatFs(n.GetPath())
}
......
......@@ -119,6 +119,6 @@ func (fs *prefixFileSystem) String() string {
return fmt.Sprintf("prefixFileSystem(%s,%s)", fs.FileSystem.String(), fs.Prefix)
}
func (fs *prefixFileSystem) StatFs(name string) *nodefs.StatfsOut {
func (fs *prefixFileSystem) StatFs(name string) *fuse.StatfsOut {
return fs.FileSystem.StatFs(fs.prefixed(name))
}
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