mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Update buildkit version to commit which uses 2.0 Signed-off-by: Derek McGowan <derek@mcg.dev>
21 lines
415 B
Go
21 lines
415 B
Go
//go:build !windows
|
|
|
|
package snapshotter
|
|
|
|
import (
|
|
"github.com/containerd/containerd/v2/core/mount"
|
|
"github.com/moby/sys/mountinfo"
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
// isMounted parses /proc/mountinfo to check whether the specified path
|
|
// is mounted.
|
|
func isMounted(path string) bool {
|
|
m, _ := mountinfo.Mounted(path)
|
|
return m
|
|
}
|
|
|
|
func unmount(target string) error {
|
|
return mount.Unmount(target, unix.MNT_DETACH)
|
|
}
|