github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/pkg/system/stat_linux.go (about) 1 package system // import "github.com/demonoid81/moby/pkg/system" 2 3 import "syscall" 4 5 // fromStatT converts a syscall.Stat_t type to a system.Stat_t type 6 func fromStatT(s *syscall.Stat_t) (*StatT, error) { 7 return &StatT{size: s.Size, 8 mode: s.Mode, 9 uid: s.Uid, 10 gid: s.Gid, 11 // the type is 32bit on mips 12 rdev: uint64(s.Rdev), // nolint: unconvert 13 mtim: s.Mtim}, nil 14 } 15 16 // FromStatT converts a syscall.Stat_t type to a system.Stat_t type 17 // This is exposed on Linux as pkg/archive/changes uses it. 18 func FromStatT(s *syscall.Stat_t) (*StatT, error) { 19 return fromStatT(s) 20 }