aboutsummaryrefslogtreecommitdiff
path: root/pathfs_frontend
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-09-30 23:42:18 +0200
committerJakob Unterwurzacher2015-09-30 23:42:18 +0200
commit3fef613591b6831d0ebc8bd2aff4264346a1d047 (patch)
treeac4659e9e56357b84fb248b334f03fe97e20b450 /pathfs_frontend
parentb835f83fd54944de0aa87a4e53073c1204450fda (diff)
tests: Add append test
Diffstat (limited to 'pathfs_frontend')
-rw-r--r--pathfs_frontend/file.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pathfs_frontend/file.go b/pathfs_frontend/file.go
index fe346b6..a4ed30b 100644
--- a/pathfs_frontend/file.go
+++ b/pathfs_frontend/file.go
@@ -70,11 +70,12 @@ func (f *file) doRead(off uint64, length uint64) ([]byte, fuse.Status) {
cryptfs.Warn.Printf("read: ReadAt: %s\n", err.Error())
return nil, fuse.ToStatus(err)
}
- cryptfs.Debug.Printf("ReadAt length=%d offset=%d -> n=%d len=%d\n", alignedLength, alignedOffset, n, len(ciphertext))
+ cryptfs.Debug.Printf("ReadAt offset=%d length=%d -> n=%d len=%d\n", alignedLength, alignedOffset, n, len(ciphertext))
// Decrypt it
plaintext, err := f.cfs.DecryptBlocks(ciphertext)
if err != nil {
+ cryptfs.Warn.Printf("Corrupt block at offset=%d\n", off + uint64(len(plaintext)))
cryptfs.Warn.Printf("doRead: returning IO error\n")
return nil, fuse.EIO
}