From 0300271bf73d515393ac41f354a39889b07b88fc Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Thu, 19 May 2022 14:50:49 +0100 Subject: libpod/define: Make TypeBind a platform-specific constant This allows us to redefine to the equivalent nullfs on FreeBSD. [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson --- libpod/define/mount.go | 2 -- libpod/define/mount_freebsd.go | 8 ++++++++ libpod/define/mount_linux.go | 8 ++++++++ libpod/define/mount_unsupported.go | 8 ++++++++ 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 libpod/define/mount_freebsd.go create mode 100644 libpod/define/mount_linux.go create mode 100644 libpod/define/mount_unsupported.go (limited to 'libpod') diff --git a/libpod/define/mount.go b/libpod/define/mount.go index 1b0d019c8..db444fd83 100644 --- a/libpod/define/mount.go +++ b/libpod/define/mount.go @@ -1,8 +1,6 @@ package define const ( - // TypeBind is the type for mounting host dir - TypeBind = "bind" // TypeVolume is the type for named volumes TypeVolume = "volume" // TypeTmpfs is the type for mounting tmpfs diff --git a/libpod/define/mount_freebsd.go b/libpod/define/mount_freebsd.go new file mode 100644 index 000000000..e080c9ec6 --- /dev/null +++ b/libpod/define/mount_freebsd.go @@ -0,0 +1,8 @@ +//go:build freebsd + +package define + +const ( + // TypeBind is the type for mounting host dir + TypeBind = "nullfs" +) diff --git a/libpod/define/mount_linux.go b/libpod/define/mount_linux.go new file mode 100644 index 000000000..5ef848905 --- /dev/null +++ b/libpod/define/mount_linux.go @@ -0,0 +1,8 @@ +//go:build linux + +package define + +const ( + // TypeBind is the type for mounting host dir + TypeBind = "bind" +) diff --git a/libpod/define/mount_unsupported.go b/libpod/define/mount_unsupported.go new file mode 100644 index 000000000..cb8642fe2 --- /dev/null +++ b/libpod/define/mount_unsupported.go @@ -0,0 +1,8 @@ +//go:build !linux && !freebsd + +package define + +const ( + // TypeBind is the type for mounting host dir + TypeBind = "bind" +) -- cgit v1.2.3-54-g00ecf