1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/pkg/parsers/kernel/uname_linux.go

18 lines
442 B
Go
Raw Normal View History

package kernel // import "github.com/docker/docker/pkg/parsers/kernel"
2013-05-15 20:40:47 -04:00
import "golang.org/x/sys/unix"
2013-05-15 20:40:47 -04:00
// Utsname represents the system name structure.
// It is passthrough for unix.Utsname in order to make it portable with
// other platforms where it is not available.
type Utsname unix.Utsname
func uname() (*unix.Utsname, error) {
uts := &unix.Utsname{}
2013-05-15 20:40:47 -04:00
if err := unix.Uname(uts); err != nil {
2013-05-15 20:40:47 -04:00
return nil, err
}
return uts, nil
}