github.com/khulnasoft-lab/khulnasoft@v26.0.1-0.20240328202558-330a6f959fe0+incompatible/pkg/system/stat_linux.go (about)

     1  package system // import "github.com/docker/docker/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{
     8  		size: s.Size,
     9  		mode: s.Mode,
    10  		uid:  s.Uid,
    11  		gid:  s.Gid,
    12  		// the type is 32bit on mips
    13  		rdev: uint64(s.Rdev), //nolint: unconvert
    14  		mtim: s.Mtim,
    15  	}, nil
    16  }
    17  
    18  // FromStatT converts a syscall.Stat_t type to a system.Stat_t type
    19  // This is exposed on Linux as pkg/archive/changes uses it.
    20  func FromStatT(s *syscall.Stat_t) (*StatT, error) {
    21  	return fromStatT(s)
    22  }