diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-10-27 13:20:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-27 13:20:07 -0400 |
commit | eda5a6d069855c30fafe01c5226b9110c5691d91 (patch) | |
tree | fb03285809ad13abd56bb20801e75446a5a75396 /vendor/github.com/moby/sys/mountinfo/mountinfo_filters.go | |
parent | cef85763e5f5453c622608eb714f5206fe5b5b9d (diff) | |
parent | 2099c86f3321c44906c0db476f6d0fee10beb265 (diff) | |
download | podman-eda5a6d069855c30fafe01c5226b9110c5691d91.tar.gz podman-eda5a6d069855c30fafe01c5226b9110c5691d91.tar.bz2 podman-eda5a6d069855c30fafe01c5226b9110c5691d91.zip |
Merge pull request #8145 from containers/dependabot/go_modules/github.com/containers/common-0.26.2
Bump github.com/containers/common from 0.26.0 to 0.26.3
Diffstat (limited to 'vendor/github.com/moby/sys/mountinfo/mountinfo_filters.go')
-rw-r--r-- | vendor/github.com/moby/sys/mountinfo/mountinfo_filters.go | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/vendor/github.com/moby/sys/mountinfo/mountinfo_filters.go b/vendor/github.com/moby/sys/mountinfo/mountinfo_filters.go index 8aebe1ad4..5869b2cee 100644 --- a/vendor/github.com/moby/sys/mountinfo/mountinfo_filters.go +++ b/vendor/github.com/moby/sys/mountinfo/mountinfo_filters.go @@ -6,12 +6,12 @@ import "strings" // used to filter out mountinfo entries we're not interested in, // and/or stop further processing if we found what we wanted. // -// It takes a pointer to the Info struct (not fully populated, -// currently only Mountpoint, Fstype, Source, and (on Linux) -// VfsOpts are filled in), and returns two booleans: +// It takes a pointer to the Info struct (fully populated with all available +// fields on the GOOS platform), and returns two booleans: // -// - skip: true if the entry should be skipped -// - stop: true if parsing should be stopped after the entry +// skip: true if the entry should be skipped; +// +// stop: true if parsing should be stopped after the entry. type FilterFunc func(*Info) (skip, stop bool) // PrefixFilter discards all entries whose mount points @@ -36,8 +36,8 @@ func SingleEntryFilter(mp string) FilterFunc { // ParentsFilter returns all entries whose mount points // can be parents of a path specified, discarding others. // -// For example, given `/var/lib/docker/something`, entries -// like `/var/lib/docker`, `/var` and `/` are returned. +// For example, given /var/lib/docker/something, entries +// like /var/lib/docker, /var and / are returned. func ParentsFilter(path string) FilterFunc { return func(m *Info) (bool, bool) { skip := !strings.HasPrefix(path, m.Mountpoint) @@ -45,12 +45,12 @@ func ParentsFilter(path string) FilterFunc { } } -// FstypeFilter returns all entries that match provided fstype(s). -func FstypeFilter(fstype ...string) FilterFunc { +// FSTypeFilter returns all entries that match provided fstype(s). +func FSTypeFilter(fstype ...string) FilterFunc { return func(m *Info) (bool, bool) { for _, t := range fstype { - if m.Fstype == t { - return false, false // don't skeep, keep going + if m.FSType == t { + return false, false // don't skip, keep going } } return true, false // skip, keep going |