From 3fef613591b6831d0ebc8bd2aff4264346a1d047 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Wed, 30 Sep 2015 23:42:18 +0200 Subject: tests: Add append test --- pathfs_frontend/file.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pathfs_frontend/file.go') 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 } -- cgit v1.2.3