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 <dfr@rabson.org>
This commit is contained in:
Doug Rabson 2022-05-19 14:50:49 +01:00
parent 72f4c77139
commit 0300271bf7
4 changed files with 24 additions and 2 deletions

View file

@ -1,8 +1,6 @@
package define package define
const ( const (
// TypeBind is the type for mounting host dir
TypeBind = "bind"
// TypeVolume is the type for named volumes // TypeVolume is the type for named volumes
TypeVolume = "volume" TypeVolume = "volume"
// TypeTmpfs is the type for mounting tmpfs // TypeTmpfs is the type for mounting tmpfs

View file

@ -0,0 +1,8 @@
//go:build freebsd
package define
const (
// TypeBind is the type for mounting host dir
TypeBind = "nullfs"
)

View file

@ -0,0 +1,8 @@
//go:build linux
package define
const (
// TypeBind is the type for mounting host dir
TypeBind = "bind"
)

View file

@ -0,0 +1,8 @@
//go:build !linux && !freebsd
package define
const (
// TypeBind is the type for mounting host dir
TypeBind = "bind"
)