syscallcompat: explain why we don't use syscall.ParseDirent()
syscall.ParseDirent only returns the NAMES, we want everything.
This commit is contained in:
parent
7015a6ebfb
commit
de878a3346
|
@ -61,7 +61,10 @@ func getdents(fd int) ([]fuse.DirEntry, error) {
|
||||||
offset += int(s.Reclen)
|
offset += int(s.Reclen)
|
||||||
numEntries++
|
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)
|
entries := make([]fuse.DirEntry, 0, numEntries)
|
||||||
offset = 0
|
offset = 0
|
||||||
for offset < len(buf) {
|
for offset < len(buf) {
|
||||||
|
|
Loading…
Reference in New Issue