summaryrefslogtreecommitdiff
path: root/libpod/util.go
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2018-12-03 21:49:08 +0100
committerMiloslav Trmač <mitr@redhat.com>2018-12-06 23:31:54 +0100
commitb70f8b3884e42b17748f8d503c84b855aa1eda8d (patch)
tree079ad2299b19079f2c48fcfb5707fd5d4347e9d5 /libpod/util.go
parent6a0afce7c8ddfb9d70467da17b7f820a5aba5c56 (diff)
downloadpodman-b70f8b3884e42b17748f8d503c84b855aa1eda8d.tar.gz
podman-b70f8b3884e42b17748f8d503c84b855aa1eda8d.tar.bz2
podman-b70f8b3884e42b17748f8d503c84b855aa1eda8d.zip
Fix build on non-Linux
Unrelated to the rest of the PR. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'libpod/util.go')
-rw-r--r--libpod/util.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/libpod/util.go b/libpod/util.go
index aa3494529..b7578135a 100644
--- a/libpod/util.go
+++ b/libpod/util.go
@@ -9,10 +9,8 @@ import (
"strings"
"time"
- "github.com/containerd/cgroups"
"github.com/containers/image/signature"
"github.com/containers/image/types"
- "github.com/containers/libpod/pkg/util"
"github.com/fsnotify/fsnotify"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
@@ -189,26 +187,3 @@ func validPodNSOption(p *Pod, ctrPod string) error {
}
return nil
}
-
-// GetV1CGroups gets the V1 cgroup subsystems and then "filters"
-// out any subsystems that are provided by the caller. Passing nil
-// for excludes will return the subsystems unfiltered.
-//func GetV1CGroups(excludes []string) ([]cgroups.Subsystem, error) {
-func GetV1CGroups(excludes []string) cgroups.Hierarchy {
- return func() ([]cgroups.Subsystem, error) {
- var filtered []cgroups.Subsystem
-
- subSystem, err := cgroups.V1()
- if err != nil {
- return nil, err
- }
- for _, s := range subSystem {
- // If the name of the subsystem is not in the list of excludes, then
- // add it as a keeper.
- if !util.StringInSlice(string(s.Name()), excludes) {
- filtered = append(filtered, s)
- }
- }
- return filtered, nil
- }
-}