2015-09-23 04:56:29 +00:00
|
|
|
package allocdir
|
|
|
|
|
|
|
|
import (
|
|
|
|
"syscall"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Hardlinks the shared directory. As a side-effect the shared directory and
|
|
|
|
// task directory must be on the same filesystem.
|
2015-09-25 23:49:14 +00:00
|
|
|
func (d *AllocDir) mountSharedDir(dir string) error {
|
|
|
|
return syscall.Link(d.SharedDir, dir)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (d *AllocDir) unmountSharedDir(dir string) error {
|
|
|
|
return syscall.Unlink(dir)
|
2015-09-23 04:56:29 +00:00
|
|
|
}
|
2016-02-08 22:11:53 +00:00
|
|
|
|
|
|
|
// MountSpecialDirs mounts the dev and proc file system on the chroot of the
|
|
|
|
// task. It's a no-op on darwin.
|
|
|
|
func (d *AllocDir) MountSpecialDirs(taskDir string) error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2016-02-09 02:51:11 +00:00
|
|
|
// unmountSpecialDirs unmounts the dev and proc file system from the chroot
|
|
|
|
func (d *AllocDir) unmountSpecialDirs(taskDir string) error {
|
2016-02-08 22:11:53 +00:00
|
|
|
return nil
|
|
|
|
}
|