2014-07-29 00:23:38 +00:00
|
|
|
package kernel
|
|
|
|
|
|
|
|
import (
|
|
|
|
"syscall"
|
|
|
|
)
|
|
|
|
|
2015-07-25 08:35:07 +00:00
|
|
|
// Utsname represents the system name structure.
|
2016-04-09 13:18:15 +00:00
|
|
|
// It is passthrough for syscall.Utsname in order to make it portable with
|
2015-07-25 08:35:07 +00:00
|
|
|
// other platforms where it is not available.
|
2014-07-29 00:23:38 +00:00
|
|
|
type Utsname syscall.Utsname
|
|
|
|
|
|
|
|
func uname() (*syscall.Utsname, error) {
|
|
|
|
uts := &syscall.Utsname{}
|
|
|
|
|
|
|
|
if err := syscall.Uname(uts); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return uts, nil
|
|
|
|
}
|