vendor: containerd/cgroups 318312a373405e5e91134d8063d04d59768a1bff

full diff: 0dbf7f05ba...318312a373

relevant changes:

- cpuset: typo fix for function name
- Retry file writes on EINTR errors to work with Go 1.14 asynchronous preemption
- Various linting issues and cleanup

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2020-07-13 14:54:05 +02:00
parent a6697c1d5f
commit cc493eba3f
23 changed files with 85 additions and 106 deletions

View File

@@ -25,7 +25,7 @@ import (
type Path func(subsystem Name) (string, error)
func RootPath(subsysem Name) (string, error) {
func RootPath(subsystem Name) (string, error) {
return "/", nil
}
@@ -63,7 +63,7 @@ var ErrControllerNotActive = errors.New("controller is not supported")
func existingPath(paths map[string]string, suffix string) Path {
// localize the paths based on the root mount dest for nested cgroups
for n, p := range paths {
dest, err := getCgroupDestination(string(n))
dest, err := getCgroupDestination(n)
if err != nil {
return errorPath(err)
}
@@ -79,7 +79,7 @@ func existingPath(paths map[string]string, suffix string) Path {
return func(name Name) (string, error) {
root, ok := paths[string(name)]
if !ok {
if root, ok = paths[fmt.Sprintf("name=%s", name)]; !ok {
if root, ok = paths["name="+string(name)]; !ok {
return "", ErrControllerNotActive
}
}