Browse Source

Merge pull request #41441 from iamleot/netbsd-from_stat_t

Add fromStatT() implementation for NetBSD
Sebastiaan van Stijn 4 years ago
parent
commit
f416e99a05
1 changed files with 13 additions and 0 deletions
  1. 13 0
      pkg/system/stat_netbsd.go

+ 13 - 0
pkg/system/stat_netbsd.go

@@ -0,0 +1,13 @@
+package system // import "github.com/docker/docker/pkg/system"
+
+import "syscall"
+
+// fromStatT converts a syscall.Stat_t type to a system.Stat_t type
+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
+}