go.mod: github.com/moby/sys/mountinfo v0.4.1
full diff: https://github.com/moby/sys/compare/mountinfo/v0.4.0...mountinfo/v0.4.1 Fixes and improvements: - Fix PrefixFilter() being too greedy - TestMountedBy*: add missing pre-checks - Documentation improvements Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
5
vendor/github.com/moby/sys/mountinfo/mountinfo_linux.go
generated
vendored
5
vendor/github.com/moby/sys/mountinfo/mountinfo_linux.go
generated
vendored
@@ -12,7 +12,8 @@ import (
|
||||
// GetMountsFromReader retrieves a list of mounts from the
|
||||
// reader provided, with an optional filter applied (use nil
|
||||
// for no filter). This can be useful in tests or benchmarks
|
||||
// that provide a fake mountinfo data.
|
||||
// that provide fake mountinfo data, or when a source other
|
||||
// than /proc/self/mountinfo needs to be read from.
|
||||
//
|
||||
// This function is Linux-specific.
|
||||
func GetMountsFromReader(r io.Reader, filter FilterFunc) ([]*Info, error) {
|
||||
@@ -133,8 +134,6 @@ func GetMountsFromReader(r io.Reader, filter FilterFunc) ([]*Info, error) {
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Parse /proc/self/mountinfo because comparing Dev and ino does not work from
|
||||
// bind mounts
|
||||
func parseMountTable(filter FilterFunc) ([]*Info, error) {
|
||||
f, err := os.Open("/proc/self/mountinfo")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user