summaryrefslogtreecommitdiff
path: root/pathfs_frontend
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-10-04 14:24:43 +0200
committerJakob Unterwurzacher2015-10-04 14:24:43 +0200
commitc859f0b2dc8825763c3b63163a014435a8cdb3cf (patch)
tree3dc6f686e00322bfca25a70cb256524d27df81f4 /pathfs_frontend
parent775676ecb82f415874f3c6b83da1436b629166f4 (diff)
intraBlock: Rename Offset to Skip
"Offset" is unclear whether it is an offset from the start of file or start of block. "Skip" seems much better.
Diffstat (limited to 'pathfs_frontend')
-rw-r--r--pathfs_frontend/file.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pathfs_frontend/file.go b/pathfs_frontend/file.go
index 733bfd0..cc8de17 100644
--- a/pathfs_frontend/file.go
+++ b/pathfs_frontend/file.go
@@ -153,7 +153,7 @@ func (f *file) doWrite(data []byte, off int64) (uint32, fuse.Status) {
return written, status
}
// Modify
- blockData = f.cfs.MergeBlocks(oldData, blockData, int(b.Offset))
+ blockData = f.cfs.MergeBlocks(oldData, blockData, int(b.Skip))
cryptfs.Debug.Printf("len(oldData)=%d len(blockData)=%d\n", len(oldData), len(blockData))
}
@@ -253,7 +253,7 @@ func (f *file) Truncate(newSize uint64) fuse.Status {
// First and last block may be partial
if b.IsPartial() {
off, _ := b.PlaintextRange()
- off += b.Offset
+ off += b.Skip
_, status := f.doWrite(make([]byte, b.Length), int64(off))
if status != fuse.OK {
return status