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
This commit is contained in:
Jakob Unterwurzacher 2018-01-25 21:40:48 +01:00
parent 163964b090
commit b318572312

View File

@ -55,7 +55,7 @@ func getdents(fd int) ([]fuse.DirEntry, error) {
} }
if int(s.Reclen) > sizeofDirent { if int(s.Reclen) > sizeofDirent {
tlog.Warn.Printf("Getdents: corrupt entry #%d: Reclen=%d > %d. Returning EBADR", tlog.Warn.Printf("Getdents: corrupt entry #%d: Reclen=%d > %d. Returning EBADR",
numEntries, sizeofDirent, s.Reclen) numEntries, s.Reclen, sizeofDirent)
return nil, syscall.EBADR return nil, syscall.EBADR
} }
offset += int(s.Reclen) offset += int(s.Reclen)