mount

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2015 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RDONLY      = syscall.MS_RDONLY
	NOSUID      = syscall.MS_NOSUID
	NODEV       = syscall.MS_NODEV
	NOEXEC      = syscall.MS_NOEXEC
	SYNCHRONOUS = syscall.MS_SYNCHRONOUS
	DIRSYNC     = syscall.MS_DIRSYNC
	REMOUNT     = syscall.MS_REMOUNT
	MANDLOCK    = syscall.MS_MANDLOCK
	NOATIME     = syscall.MS_NOATIME
	NODIRATIME  = syscall.MS_NODIRATIME
	BIND        = syscall.MS_BIND
	RBIND       = syscall.MS_BIND | syscall.MS_REC
	UNBINDABLE  = syscall.MS_UNBINDABLE
	RUNBINDABLE = syscall.MS_UNBINDABLE | syscall.MS_REC
	PRIVATE     = syscall.MS_PRIVATE
	RPRIVATE    = syscall.MS_PRIVATE | syscall.MS_REC
	SLAVE       = syscall.MS_SLAVE
	RSLAVE      = syscall.MS_SLAVE | syscall.MS_REC
	SHARED      = syscall.MS_SHARED
	RSHARED     = syscall.MS_SHARED | syscall.MS_REC
	RELATIME    = syscall.MS_RELATIME
	STRICTATIME = syscall.MS_STRICTATIME
)

Variables

This section is empty.

Functions

func ForceMount

func ForceMount(device, target, mType, options string) error

Mount the specified options at the target path reguardless if the target is mounted or not Options must be specified as fstab style

func ForceUnmount

func ForceUnmount(target string) (err error)

Unmount the target reguardless if it is mounted or not

func MakePrivate added in v1.4.0

func MakePrivate(mountPoint string) error

func MakeRPrivate added in v1.4.0

func MakeRPrivate(mountPoint string) error

func MakeRShared added in v1.4.0

func MakeRShared(mountPoint string) error

func MakeRSlave added in v1.4.0

func MakeRSlave(mountPoint string) error

func MakeRUnbindable added in v1.4.0

func MakeRUnbindable(mountPoint string) error

func MakeShared added in v1.4.0

func MakeShared(mountPoint string) error

func MakeSlave added in v1.4.0

func MakeSlave(mountPoint string) error

func MakeUnbindable added in v1.4.0

func MakeUnbindable(mountPoint string) error

func Mount

func Mount(device, target, mType, options string) error

Mount the specified options at the target path only if the target is not mounted Options must be specified as fstab style

func Mounted

func Mounted(mountpoint string) (bool, error)

Looks at /proc/self/mountinfo to determine of the specified mountpoint has been mounted

func Unmount

func Unmount(target string) error

Unmount the target only if it is mounted

Types

type MountInfo

type MountInfo struct {
	Id, Parent, Major, Minor         int
	Root, Mountpoint, Opts, Optional string
	Fstype, Source, VfsOpts          string
}

func GetMounts

func GetMounts() ([]*MountInfo, error)

func PidMountInfo added in v1.4.0

func PidMountInfo(pid int) ([]*MountInfo, error)

PidMountInfo collects the mounts for a specific Pid

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL