diff options
Diffstat (limited to 'internal')
-rw-r--r-- | internal/fusefrontend/node.go | 14 | ||||
-rw-r--r-- | internal/fusefrontend/node_api_check.go | 2 |
2 files changed, 15 insertions, 1 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 +} diff --git a/internal/fusefrontend/node_api_check.go b/internal/fusefrontend/node_api_check.go index 9168ea5..384badc 100644 --- a/internal/fusefrontend/node_api_check.go +++ b/internal/fusefrontend/node_api_check.go @@ -16,9 +16,9 @@ var _ = (fs.NodeReadlinker)((*Node)(nil)) var _ = (fs.NodeOpener)((*Node)(nil)) var _ = (fs.NodeOpendirer)((*Node)(nil)) var _ = (fs.NodeSetattrer)((*Node)(nil)) +var _ = (fs.NodeStatfser)((*Node)(nil)) /* TODO -var _ = (fs.NodeStatfser)((*Node)(nil)) var _ = (fs.NodeGetxattrer)((*Node)(nil)) var _ = (fs.NodeSetxattrer)((*Node)(nil)) var _ = (fs.NodeRemovexattrer)((*Node)(nil)) |