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