• Han-Wen Nienhuys's avatar
    fs: redeclare syscall.Dirent locally · 588c83d1
    Han-Wen Nienhuys authored
    syscall.Dirent declares a 256-byte "name" field. In reality, this
    field is only as long as necessary to transmit the name, so more
    entries can be packed in a page.
    
    When casting the result to syscall.Dirent, the result might run over
    the end of the byte buffer, which the race detector doesn't like.
    
    Address this by using our own flavor of syscall.Dirent. All linux
    flavors use the same structure layout, except for the amount of
    padding at the end.
    
    Change-Id: I618f7ef9e167894e1ab25b2113dcd20d7b76ceb4
    588c83d1
dirstream_linux.go 2.17 KB