mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
18 lines
419 B
Go
18 lines
419 B
Go
|
// +build !windows
|
||
|
|
||
|
package mount // import "github.com/docker/docker/pkg/mount"
|
||
|
|
||
|
import "golang.org/x/sys/unix"
|
||
|
|
||
|
func unmount(target string, flags int) error {
|
||
|
err := unix.Unmount(target, flags)
|
||
|
if 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.
|
||
|
err = nil
|
||
|
}
|
||
|
|
||
|
return err
|
||
|
}
|