summaryrefslogtreecommitdiff
path: root/internal/fusefrontend/node.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/fusefrontend/node.go')
-rw-r--r--internal/fusefrontend/node.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/fusefrontend/node.go b/internal/fusefrontend/node.go
index dae38df..bdc30b3 100644
--- a/internal/fusefrontend/node.go
+++ b/internal/fusefrontend/node.go
@@ -282,3 +282,17 @@ func (n *Node) Setattr(ctx context.Context, f fs.FileHandle, in *fuse.SetAttrIn,
}
return f2.Setattr(ctx, in, out)
}
+
+// 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
+}