2018-02-05 21:05:59 +00:00
|
|
|
package system // import "github.com/docker/docker/pkg/system"
|
2016-03-18 13:53:19 +00:00
|
|
|
|
2017-04-05 22:35:43 +00:00
|
|
|
import "syscall"
|
2016-03-18 13:53:19 +00:00
|
|
|
|
2017-04-05 22:35:43 +00:00
|
|
|
// fromStatT converts a syscall.Stat_t type to a system.Stat_t type
|
2016-03-18 13:53:19 +00:00
|
|
|
func fromStatT(s *syscall.Stat_t) (*StatT, error) {
|
2022-01-20 12:51:07 +00:00
|
|
|
return &StatT{
|
|
|
|
size: s.Size,
|
2016-03-18 13:53:19 +00:00
|
|
|
mode: uint32(s.Mode),
|
|
|
|
uid: s.Uid,
|
|
|
|
gid: s.Gid,
|
|
|
|
rdev: uint64(s.Rdev),
|
2022-01-20 12:51:07 +00:00
|
|
|
mtim: s.Mtim,
|
|
|
|
}, nil
|
2016-03-18 13:53:19 +00:00
|
|
|
}
|