2014-07-29 00:23:38 +00:00
|
|
|
package kernel
|
2013-05-16 00:40:47 +00:00
|
|
|
|
|
|
|
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.
|
2013-05-19 01:55:59 +00:00
|
|
|
type Utsname syscall.Utsname
|
|
|
|
|
2013-05-20 17:43:09 +00:00
|
|
|
func uname() (*syscall.Utsname, error) {
|
2013-05-16 00:40:47 +00:00
|
|
|
uts := &syscall.Utsname{}
|
|
|
|
|
|
|
|
if err := syscall.Uname(uts); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return uts, nil
|
|
|
|
}
|