From f322ee87e31a6ceb04c25fa62dcde4df6e45f92a Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Mon, 1 May 2017 19:12:37 +0200 Subject: fusefrontend: rely on nodefs.defaultFile for no-op functions Now that we embed nodefs.NewDefaultFile(), we can drop our own no-ops. --- internal/fusefrontend/file.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go index 0a8c8aa..9784b3e 100644 --- a/internal/fusefrontend/file.go +++ b/internal/fusefrontend/file.go @@ -22,6 +22,8 @@ import ( "github.com/rfjakob/gocryptfs/internal/tlog" ) +var _ nodefs.File = &file{} // Verify that interface is implemented. + // File - based on loopbackFile in go-fuse/fuse/nodefs/files.go type file struct { fd *os.File @@ -84,13 +86,6 @@ func (f *file) intFd() int { return int(f.fd.Fd()) } -func (f *file) InnerFile() nodefs.File { - return nil -} - -func (f *file) SetInode(n *nodefs.Inode) { -} - // readFileID loads the file header from disk and extracts the file ID. // Returns io.EOF if the file is empty. func (f *file) readFileID() ([]byte, error) { -- cgit v1.2.3