gopkg.in/hugelgupf/u-root.v4@v4.0.0-20180831060141-1d761fb73d50/cmds/cp/cp_unix.go (about) 1 // Copyright 2013-2017 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 // +build darwin freebsd linux netbsd openbsd 6 7 package main 8 9 import "syscall" 10 11 func sameFile(sys1, sys2 interface{}) bool { 12 stat1 := sys1.(*syscall.Stat_t) 13 stat2 := sys2.(*syscall.Stat_t) 14 return stat1.Dev == stat2.Dev && stat1.Ino == stat2.Ino 15 }