From b3185723129725b1b5557912eb323e55033d8f67 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Thu, 25 Jan 2018 21:40:48 +0100 Subject: [PATCH] syscallcompat: fix reversed warning output We used to print somewhat strange messages: Getdents: corrupt entry #1: Reclen=276 > 280. Returning EBADR Reported at https://github.com/rfjakob/gocryptfs/issues/197 --- internal/syscallcompat/getdents_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/syscallcompat/getdents_linux.go b/internal/syscallcompat/getdents_linux.go index 1b3569b..aaa69ac 100644 --- a/internal/syscallcompat/getdents_linux.go +++ b/internal/syscallcompat/getdents_linux.go @@ -55,7 +55,7 @@ func getdents(fd int) ([]fuse.DirEntry, error) { } if int(s.Reclen) > sizeofDirent { tlog.Warn.Printf("Getdents: corrupt entry #%d: Reclen=%d > %d. Returning EBADR", - numEntries, sizeofDirent, s.Reclen) + numEntries, s.Reclen, sizeofDirent) return nil, syscall.EBADR } offset += int(s.Reclen)