2021-08-23 15:14:53 +02:00
|
|
|
//go:build freebsd || netbsd
|
2020-09-14 18:21:01 +02:00
|
|
|
// +build freebsd netbsd
|
|
|
|
|
2018-02-05 16:05:59 -05:00
|
|
|
package system // import "github.com/docker/docker/pkg/system"
|
2015-07-29 21:25:56 +03:00
|
|
|
|
2017-04-05 15:35:43 -07:00
|
|
|
import "syscall"
|
2015-07-29 21:25:56 +03:00
|
|
|
|
|
|
|
// fromStatT converts a syscall.Stat_t type to a system.Stat_t type
|
2015-07-29 00:13:12 +08:00
|
|
|
func fromStatT(s *syscall.Stat_t) (*StatT, error) {
|
|
|
|
return &StatT{size: s.Size,
|
2015-07-29 21:25:56 +03:00
|
|
|
mode: uint32(s.Mode),
|
|
|
|
uid: s.Uid,
|
|
|
|
gid: s.Gid,
|
|
|
|
rdev: uint64(s.Rdev),
|
|
|
|
mtim: s.Mtimespec}, nil
|
|
|
|
}
|