summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/fusefrontend_reverse/node.go14
-rw-r--r--internal/fusefrontend_reverse/node_api_check.go2
2 files changed, 15 insertions, 1 deletions
diff --git a/internal/fusefrontend_reverse/node.go b/internal/fusefrontend_reverse/node.go
index de1ee49..d7748f6 100644
--- a/internal/fusefrontend_reverse/node.go
+++ b/internal/fusefrontend_reverse/node.go
@@ -177,3 +177,17 @@ func (n *Node) Open(ctx context.Context, flags uint32) (fh fs.FileHandle, fuseFl
}
return
}
+
+// StatFs - FUSE call. Returns information about the filesystem.
+//
+// Symlink-safe because the path is ignored.
+func (n *Node) Statfs(ctx context.Context, out *fuse.StatfsOut) syscall.Errno {
+ p := n.rootNode().args.Cipherdir
+ var st syscall.Statfs_t
+ err := syscall.Statfs(p, &st)
+ if err != nil {
+ return fs.ToErrno(err)
+ }
+ out.FromStatfsT(&st)
+ return 0
+}
diff --git a/internal/fusefrontend_reverse/node_api_check.go b/internal/fusefrontend_reverse/node_api_check.go
index c7cb6aa..90b5bdd 100644
--- a/internal/fusefrontend_reverse/node_api_check.go
+++ b/internal/fusefrontend_reverse/node_api_check.go
@@ -10,9 +10,9 @@ var _ = (fs.NodeLookuper)((*Node)(nil))
var _ = (fs.NodeReaddirer)((*Node)(nil))
var _ = (fs.NodeReadlinker)((*Node)(nil))
var _ = (fs.NodeOpener)((*Node)(nil))
+var _ = (fs.NodeStatfser)((*Node)(nil))
/* TODO
-var _ = (fs.NodeStatfser)((*Node)(nil))
var _ = (fs.NodeGetxattrer)((*Node)(nil))
var _ = (fs.NodeListxattrer)((*Node)(nil))
*/