mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 11:05:45 +00:00
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:
parent
928530a112
commit
2a61261a5a
@ -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=")
|
||||
|
Loading…
Reference in New Issue
Block a user