1 //:build linux
2 3 package syscall
4 5 // The linux dirent record, as offsets into the bytes getdents wrote.
6 //
7 // There is no struct: a record is variable length (the name runs to the record's
8 // reclen, NUL padded), it is read out of the buffer the kernel filled, and every
9 // field is a plain load at a fixed offset. Both linux/amd64 and linux/arm64 use
10 // this layout.
11 const (
12 DirentInoOff uintptr = 0 // uint64 inode
13 DirentOffOff uintptr = 8 // int64 offset of the next entry
14 DirentReclenOff uintptr = 16 // uint16 whole record length
15 DirentTypeOff uintptr = 18 // uint8 DT_*
16 DirentNameOff uintptr = 19 // the name, NUL padded to reclen
17 )
18