mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
c6e2af5425
Simplify the code by using a single logger instance. While at it, use WithError in Umount. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
17 lines
399 B
Go
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)
|
|
}
|