1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/pkg/mount/sharedsubtree_linux.go
Vincent Batts 930a756ad5 mount: move the MakePrivate to pkg/mount
The logic is unrelated to graphdriver.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-10-30 17:04:56 -04:00

18 lines
315 B
Go

// +build linux
package mount
func MakePrivate(mountPoint string) error {
mounted, err := Mounted(mountPoint)
if err != nil {
return err
}
if !mounted {
if err := Mount(mountPoint, mountPoint, "none", "bind,rw"); err != nil {
return err
}
}
return ForceMount("", mountPoint, "none", "private")
}