aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/node.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2020-07-11 18:59:54 +0200
committerJakob Unterwurzacher2020-07-11 18:59:54 +0200
commit855b4a95b794b9905c68afff2863138461a4be3a (patch)
tree75973b005ab1f6587dd72137645267964f24511a /internal/fusefrontend/node.go
parenta39fc8ab2e559113f23d64ff87d59842317bbb8c (diff)
v2api: implement Statfs
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
+}