syscallcompat: explain why we don't use syscall.ParseDirent()

syscall.ParseDirent only returns the NAMES, we want
everything.
This commit is contained in:
Jakob Unterwurzacher 2018-01-25 08:43:30 +01:00
parent 7015a6ebfb
commit de878a3346
1 changed files with 4 additions and 1 deletions

View File

@ -61,7 +61,10 @@ func getdents(fd int) ([]fuse.DirEntry, error) {
offset += int(s.Reclen)
numEntries++
}
// Parse the buffer into entries
// Parse the buffer into entries.
// Note: syscall.ParseDirent() only returns the names,
// we want all the data, so we have to implement
// it on our own.
entries := make([]fuse.DirEntry, 0, numEntries)
offset = 0
for offset < len(buf) {