2014-07-28 17:23:38 -07:00
|
|
|
package kernel
|
2013-05-15 17:40:47 -07:00
|
|
|
|
|
|
|
import (
|
|
|
|
"syscall"
|
|
|
|
)
|
|
|
|
|
2015-07-25 10:35:07 +02:00
|
|
|
// Utsname represents the system name structure.
|
2016-04-09 21:18:15 +08:00
|
|
|
// It is passthrough for syscall.Utsname in order to make it portable with
|
2015-07-25 10:35:07 +02:00
|
|
|
// other platforms where it is not available.
|
2013-05-18 22:55:59 -03:00
|
|
|
type Utsname syscall.Utsname
|
|
|
|
|
2013-05-20 20:43:09 +03:00
|
|
|
func uname() (*syscall.Utsname, error) {
|
2013-05-15 17:40:47 -07:00
|
|
|
uts := &syscall.Utsname{}
|
|
|
|
|
|
|
|
if err := syscall.Uname(uts); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return uts, nil
|
|
|
|
}
|