2021-09-16 10:17:20 -04:00
|
|
|
//go:build freebsd || openbsd
|
2020-11-10 08:26:15 -05:00
|
|
|
// +build freebsd openbsd
|
2017-05-10 17:13:36 -04:00
|
|
|
|
2020-04-16 05:23:37 -04:00
|
|
|
package mount
|
2017-05-10 17:13:36 -04:00
|
|
|
|
2020-11-10 08:26:15 -05:00
|
|
|
import "golang.org/x/sys/unix"
|
2017-05-10 17:13:36 -04:00
|
|
|
|
|
|
|
const (
|
|
|
|
// RDONLY will mount the filesystem as read-only.
|
2020-11-10 08:26:15 -05:00
|
|
|
RDONLY = unix.MNT_RDONLY
|
2017-05-10 17:13:36 -04:00
|
|
|
|
|
|
|
// NOSUID will not allow set-user-identifier or set-group-identifier bits to
|
|
|
|
// take effect.
|
2020-11-10 08:26:15 -05:00
|
|
|
NOSUID = unix.MNT_NOSUID
|
2017-05-10 17:13:36 -04:00
|
|
|
|
|
|
|
// NOEXEC will not allow execution of any binaries on the mounted file system.
|
2020-11-10 08:26:15 -05:00
|
|
|
NOEXEC = unix.MNT_NOEXEC
|
2017-05-10 17:13:36 -04:00
|
|
|
|
|
|
|
// SYNCHRONOUS will allow any I/O to the file system to be done synchronously.
|
2020-11-10 08:26:15 -05:00
|
|
|
SYNCHRONOUS = unix.MNT_SYNCHRONOUS
|
2017-05-10 17:13:36 -04:00
|
|
|
|
|
|
|
// NOATIME will not update the file access time when reading from a file.
|
2020-11-10 08:26:15 -05:00
|
|
|
NOATIME = unix.MNT_NOATIME
|
2017-05-10 17:13:36 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
// These flags are unsupported.
|
|
|
|
const (
|
|
|
|
BIND = 0
|
|
|
|
DIRSYNC = 0
|
|
|
|
MANDLOCK = 0
|
|
|
|
NODEV = 0
|
|
|
|
NODIRATIME = 0
|
|
|
|
UNBINDABLE = 0
|
|
|
|
RUNBINDABLE = 0
|
|
|
|
PRIVATE = 0
|
|
|
|
RPRIVATE = 0
|
|
|
|
SHARED = 0
|
|
|
|
RSHARED = 0
|
|
|
|
SLAVE = 0
|
|
|
|
RSLAVE = 0
|
|
|
|
RBIND = 0
|
|
|
|
RELATIME = 0
|
|
|
|
REMOUNT = 0
|
|
|
|
STRICTATIME = 0
|
|
|
|
mntDetach = 0
|
|
|
|
)
|