summaryrefslogtreecommitdiff
path: root/internal/fusefrontend/file_holes.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-07-01 19:10:57 +0200
committerJakob Unterwurzacher2018-07-01 20:56:22 +0200
commita2af1fb5da90ec12d05e1c3ece9c44507a5b44c8 (patch)
tree6d3dab34ea12ca3e716b40a204ce1336ca31b6f8 /internal/fusefrontend/file_holes.go
parent4a736377829f9b72a538d9f1e75ccc4defddc69a (diff)
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.
Diffstat (limited to 'internal/fusefrontend/file_holes.go')
-rw-r--r--internal/fusefrontend/file_holes.go4
1 files changed, 2 insertions, 2 deletions
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