| 1 |
//go:build aix |
| 2 |
|
| 3 |
package dirent |
| 4 |
|
| 5 |
import ( |
| 6 |
"os" |
| 7 |
"syscall" |
| 8 |
"unsafe" |
| 9 |
) |
| 10 |
|
| 11 |
func direntIno(buf []byte) (uint64, bool) { |
| 12 |
return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Ino), unsafe.Sizeof(syscall.Dirent{}.Ino)) |
| 13 |
} |
| 14 |
|
| 15 |
func direntReclen(buf []byte) (uint64, bool) { |
| 16 |
return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Reclen), unsafe.Sizeof(syscall.Dirent{}.Reclen)) |
| 17 |
} |
| 18 |
|
| 19 |
func direntNamlen(buf []byte) (uint64, bool) { |
| 20 |
reclen, ok := direntReclen(buf) |
| 21 |
if !ok { |
| 22 |
return 0, false |
| 23 |
} |
| 24 |
return reclen - uint64(unsafe.Offsetof(syscall.Dirent{}.Name)), true |
| 25 |
} |
| 26 |
|
| 27 |
func direntType(buf []byte) os.FileMode { |
| 28 |
return ^os.FileMode(0) // unknown |
| 29 |
} |