From 661786808c8a5249e05672af1f4d9cfaef39b38e Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Fri, 18 Sep 2020 02:16:25 +0900 Subject: update github.com/docker/docker and relevant deps Signed-off-by: Akihiro Suda --- vendor/github.com/moby/sys/mount/unmount_unix.go | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 vendor/github.com/moby/sys/mount/unmount_unix.go (limited to 'vendor/github.com/moby/sys/mount/unmount_unix.go') diff --git a/vendor/github.com/moby/sys/mount/unmount_unix.go b/vendor/github.com/moby/sys/mount/unmount_unix.go new file mode 100644 index 000000000..924d059a7 --- /dev/null +++ b/vendor/github.com/moby/sys/mount/unmount_unix.go @@ -0,0 +1,26 @@ +// +build !windows + +package mount + +import "golang.org/x/sys/unix" + +func unmountBare(target string, flags int) error { + return unix.Unmount(target, flags) +} + +func unmount(target string, flags int) error { + err := unmountBare(target, flags) + if err == nil || err == unix.EINVAL { + // Ignore "not mounted" error here. Note the same error + // can be returned if flags are invalid, so this code + // assumes that the flags value is always correct. + return nil + } + + return &mountError{ + op: "umount", + target: target, + flags: uintptr(flags), + err: err, + } +} -- cgit v1.2.3-54-g00ecf