mirror of
https://github.com/containers/podman.git
synced 2025-05-20 00:27:03 +08:00

There is an existing wrapper for unix.Unmount(..., MNT_DETACH) in util_linux.go but that filters all errors and for volumes, we only want to filter EINVAL. The existing libpod.Unmount seems to only have one call site so perhaps these can be merged. [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson <dfr@rabson.org>
10 lines
151 B
Go
10 lines
151 B
Go
package libpod
|
|
|
|
import (
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
func detachUnmount(mountPoint string) error {
|
|
return unix.Unmount(mountPoint, unix.MNT_DETACH)
|
|
}
|