unix: convert Utsname members from {u,}int8 array to byte array
In order to make conversion to string easier, change the Utsname
members from int8 array to byte array.
Also add a test on Linux for Uname and the string conversion of the
Utsname members.
Fixes golang/go#20753
Change-Id: Iec793dfb4a6dd8f3523cf0b6284a6162074f2e9e
Reviewed-on: https://go-review.googlesource.com/74331
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/unix/ztypes_linux_mipsle.go b/unix/ztypes_linux_mipsle.go
index 75ee05a..b6c2d32 100644
--- a/unix/ztypes_linux_mipsle.go
+++ b/unix/ztypes_linux_mipsle.go
@@ -614,12 +614,12 @@
}
type Utsname struct {
- Sysname [65]int8
- Nodename [65]int8
- Release [65]int8
- Version [65]int8
- Machine [65]int8
- Domainname [65]int8
+ Sysname [65]byte
+ Nodename [65]byte
+ Release [65]byte
+ Version [65]byte
+ Machine [65]byte
+ Domainname [65]byte
}
type Ustat_t struct {