github.com/u-root/u-root@v7.0.1-0.20200915234505-ad7babab0a8e+incompatible/pkg/cpio/sysinfo_freebsd.go (about) 1 // Copyright 2013-2019 the u-root Authors. All rights reserved 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package cpio 6 7 import ( 8 "syscall" 9 ) 10 11 func sysInfo(n string, sys *syscall.Stat_t) Info { 12 return Info{ 13 Ino: sys.Ino, 14 Mode: uint64(sys.Mode), 15 UID: uint64(sys.Uid), 16 GID: uint64(sys.Gid), 17 NLink: sys.Nlink, 18 FileSize: uint64(sys.Size), 19 Major: sys.Dev >> 8, 20 Minor: sys.Dev & 0xff, 21 Rmajor: sys.Rdev >> 8, 22 Rminor: sys.Rdev & 0xff, 23 Name: n, 24 } 25 }