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