e95f4619cd
Changes most references of syscall to golang.org/x/sys/ Ones aren't changes include, Errno, Signal and SysProcAttr as they haven't been implemented in /x/sys/. Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com> [s390x] switch utsname from unsigned to signed per https://github.com/golang/sys/commit/33267e036fd93fcd26ea95b7bdaf2d8306cb743c char in s390x in the /x/sys/unix package is now signed, so change the buildtags Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com> Upstream-commit: 069fdc8a083cb1663e4f86fe3fd9b9a1aebc3e54 Component: engine
19 lines
443 B
Go
19 lines
443 B
Go
// +build linux,arm linux,ppc64 linux,ppc64le
|
|
// see golang's sources golang.org/x/sys/unix/ztypes_linux_*.go that use uint8
|
|
|
|
package platform
|
|
|
|
// Convert the OS/ARCH-specific utsname.Machine to string
|
|
// given as an array of unsigned uint8
|
|
func charsToString(ca [65]uint8) string {
|
|
s := make([]byte, len(ca))
|
|
var lens int
|
|
for ; lens < len(ca); lens++ {
|
|
if ca[lens] == 0 {
|
|
break
|
|
}
|
|
s[lens] = ca[lens]
|
|
}
|
|
return string(s[0:lens])
|
|
}
|