stat_bsd.go 363 B

123456789101112131415
  1. // +build freebsd netbsd
  2. package system // import "github.com/docker/docker/pkg/system"
  3. import "syscall"
  4. // fromStatT converts a syscall.Stat_t type to a system.Stat_t type
  5. func fromStatT(s *syscall.Stat_t) (*StatT, error) {
  6. return &StatT{size: s.Size,
  7. mode: uint32(s.Mode),
  8. uid: s.Uid,
  9. gid: s.Gid,
  10. rdev: uint64(s.Rdev),
  11. mtim: s.Mtimespec}, nil
  12. }