diff options
author | Jakob Unterwurzacher | 2018-01-25 08:43:30 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2018-01-25 08:43:30 +0100 |
commit | de878a3346bcc070cf16fcacdc89269119489b45 (patch) | |
tree | bb7dc2c16b8a176621baf1cd0099348df4c18301 | |
parent | 7015a6ebfb530bad6b8ca5404b46599800917cd5 (diff) |
syscallcompat: explain why we don't use syscall.ParseDirent()
syscall.ParseDirent only returns the NAMES, we want
everything.
-rw-r--r-- | internal/syscallcompat/getdents_linux.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/syscallcompat/getdents_linux.go b/internal/syscallcompat/getdents_linux.go index 49f9233..1b3569b 100644 --- a/internal/syscallcompat/getdents_linux.go +++ b/internal/syscallcompat/getdents_linux.go @@ -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) { |