From a2af1fb5da90ec12d05e1c3ece9c44507a5b44c8 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 1 Jul 2018 19:10:57 +0200 Subject: fusefrontend: export "File" type "gocryptfs -fsck" will need access to helper functions, and to get that, it will need to cast a gofuse.File to a fusefrontend.File. Make fusefrontend.File exported to make this work. --- internal/fusefrontend/file_holes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/fusefrontend/file_holes.go') diff --git a/internal/fusefrontend/file_holes.go b/internal/fusefrontend/file_holes.go index d779191..2b95c5c 100644 --- a/internal/fusefrontend/file_holes.go +++ b/internal/fusefrontend/file_holes.go @@ -10,7 +10,7 @@ import ( // Will a write to plaintext offset "targetOff" create a file hole in the // ciphertext? If yes, zero-pad the last ciphertext block. -func (f *file) writePadHole(targetOff int64) fuse.Status { +func (f *File) writePadHole(targetOff int64) fuse.Status { // Get the current file size. fi, err := f.fd.Stat() if err != nil { @@ -41,7 +41,7 @@ func (f *file) writePadHole(targetOff int64) fuse.Status { // Zero-pad the file of size plainSize to the next block boundary. This is a no-op // if the file is already block-aligned. -func (f *file) zeroPad(plainSize uint64) fuse.Status { +func (f *File) zeroPad(plainSize uint64) fuse.Status { lastBlockLen := plainSize % f.contentEnc.PlainBS() if lastBlockLen == 0 { // Already block-aligned -- cgit v1.2.3