package mount

import "github.com/dotcloud/docker/pkg/mount"

Index

Constants

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
	PRIVATE     = syscall.MS_PRIVATE
	RELATIME    = syscall.MS_RELATIME
	STRICTATIME = syscall.MS_STRICTATIME
)

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 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   string
	Fstype, Source, VfsOpts  string
}

func GetMounts

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

Source Files

flags.go flags_linux.go mount.go mounter_linux.go mountinfo.go mountinfo_linux.go

Version
v1.2.0
Published
Aug 20, 2014
Platform
linux/amd64
Imports
7 packages
Last checked
10 seconds ago

Tools for package owners.