summaryrefslogtreecommitdiff
path: root/graphdriver/aufs/mount.go
blob: 1f1d98f80935391394994aef2adaf18986c98d8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package aufs

import (
	"github.com/dotcloud/docker/utils"
	"os/exec"
	"syscall"
)

func Unmount(target string) error {
	if err := exec.Command("auplink", target, "flush").Run(); err != nil {
		utils.Errorf("[warning]: couldn't run auplink before unmount: %s", err)
	}
	if err := syscall.Unmount(target, 0); err != nil {
		return err
	}
	return nil
}