1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon/graphdriver/aufs/mount.go
Kir Kolyshkin c6e2af5425
aufs: use a single logger
Simplify the code by using a single logger instance.

While at it, use WithError in Umount.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-05-20 12:02:12 +02:00

17 lines
399 B
Go

// +build linux
package aufs // import "github.com/docker/docker/daemon/graphdriver/aufs"
import (
"os/exec"
"golang.org/x/sys/unix"
)
// Unmount the target specified.
func Unmount(target string) error {
if err := exec.Command("auplink", target, "flush").Run(); err != nil {
logger.WithError(err).Warnf("Couldn't run auplink before unmount %s", target)
}
return unix.Unmount(target, 0)
}