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.
|
|
|
|
// It is passthgrouh for syscall.Utsname in order to make it portable with
|
|
|
|
// 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
|
|
|
|
}
|