go.mod: github.com/moby/sys/mountinfo v0.5.0

full diff: https://github.com/moby/sys/compare/95edfa939201...mountinfo/v0.5.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2021-11-05 13:10:26 +01:00
parent 19d9d0d2a5
commit 97073c9437
11 changed files with 27 additions and 33 deletions

View File

@@ -1,3 +1,4 @@
//go:build (freebsd && cgo) || (openbsd && cgo) || (darwin && cgo)
// +build freebsd,cgo openbsd,cgo darwin,cgo
package mountinfo
@@ -55,6 +56,10 @@ func parseMountTable(filter FilterFunc) ([]*Info, error) {
}
func mounted(path string) (bool, error) {
path, err := normalizePath(path)
if err != nil {
return false, err
}
// Fast path: compare st.st_dev fields.
// This should always work for FreeBSD and OpenBSD.
mounted, err := mountedByStat(path)