hostinfo: use Uname from golang.org/x/sys/unix in osVersionLinux

As already done in osVersionFreebsd. This will allow to use the Utsname
fields as []byte for easier conversion to string.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
This commit is contained in:
Tobias Klauser 2022-06-01 12:38:14 +02:00 committed by Brad Fitzpatrick
parent 928530a112
commit 2a61261a5a

View File

@ -13,7 +13,6 @@
"io/ioutil"
"os"
"strings"
"syscall"
"tailscale.com/util/lineread"
"tailscale.com/version/distro"
@ -68,8 +67,8 @@ func osVersionLinux() string {
return nil
})
var un syscall.Utsname
syscall.Uname(&un)
var un unix.Utsname
unix.Uname(&un)
var attrBuf strings.Builder
attrBuf.WriteString("; kernel=")