summaryrefslogtreecommitdiff
path: root/pkg/bindings/images/build_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/bindings/images/build_unix.go')
-rw-r--r--pkg/bindings/images/build_unix.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/bindings/images/build_unix.go b/pkg/bindings/images/build_unix.go
new file mode 100644
index 000000000..0afb1deb6
--- /dev/null
+++ b/pkg/bindings/images/build_unix.go
@@ -0,0 +1,16 @@
+// +build !windows
+
+package images
+
+import (
+ "os"
+ "syscall"
+)
+
+func checkHardLink(fi os.FileInfo) (devino, bool) {
+ st := fi.Sys().(*syscall.Stat_t)
+ return devino{
+ Dev: uint64(st.Dev),
+ Ino: uint64(st.Ino),
+ }, st.Nlink > 1
+}