libiberty: Fix comment typos
[official-gcc.git] / libgo / go / syscall / syscall_glibc.go
blobb524bdfc56979ada582243336c9f1e1be0b3434b
1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 //go:build hurd || linux
6 // +build hurd linux
8 package syscall
10 import "unsafe"
12 func rawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) {
13 r1, r2, _ = RawSyscall(trap, a1, a2, a3)
14 return
17 func direntIno(buf []byte) (uint64, bool) {
18 return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
21 func direntReclen(buf []byte) (uint64, bool) {
22 return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
25 func direntNamlen(buf []byte) (uint64, bool) {
26 reclen, ok := direntReclen(buf)
27 if !ok {
28 return 0, false
30 return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true