aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/node.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2020-08-16 19:41:00 +0200
committerJakob Unterwurzacher2020-08-16 19:41:00 +0200
commit58a2726977a1b1f92063a1e51c0769af71833e72 (patch)
tree2c2112205a27c48139fa3700fe093c84b3546e14 /internal/fusefrontend_reverse/node.go
parent6f3cca2cdd0265fec4613023c58dfe3378b91b71 (diff)
v2api/reverse: implement Statfs
Diffstat (limited to 'internal/fusefrontend_reverse/node.go')
-rw-r--r--internal/fusefrontend_reverse/node.go14
1 files changed, 14 insertions, 0 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
+}