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