2018-02-05 21:05:59 +00:00
|
|
|
package system // import "github.com/docker/docker/pkg/system"
|
2016-08-24 15:24:08 +00:00
|
|
|
|
2017-04-05 22:35:43 +00:00
|
|
|
import "syscall"
|
2016-08-24 15:24:08 +00:00
|
|
|
|
2017-04-05 22:35:43 +00:00
|
|
|
// fromStatT converts a syscall.Stat_t type to a system.Stat_t type
|
2016-08-24 15:24:08 +00:00
|
|
|
func fromStatT(s *syscall.Stat_t) (*StatT, error) {
|
|
|
|
return &StatT{size: s.Size,
|
|
|
|
mode: uint32(s.Mode),
|
|
|
|
uid: s.Uid,
|
|
|
|
gid: s.Gid,
|
|
|
|
rdev: uint64(s.Rdev),
|
|
|
|
mtim: s.Mtimespec}, nil
|
|
|
|
}
|