Skip to content

Commit 2c9fdbd

Browse files
committed
common/pkg/cgroups.AvailableControllers: cleanup and inline
Ref: containers#417 (comment) Signed-off-by: Lokesh Mandvekar <[email protected]>
1 parent bf349ae commit 2c9fdbd

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

common/pkg/cgroups/cgroups_linux.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ func init() {
7474
}
7575
}
7676

77-
// getAvailableControllers get the available controllers.
78-
func getAvailableControllers() ([]string, error) {
77+
// AvailableControllers get string:bool map of all the available controllers.
78+
func AvailableControllers() ([]string, error) {
7979
controllers := []string{}
8080
controllersFile := filepath.Join(cgroupRoot, "cgroup.controllers")
8181

@@ -99,11 +99,6 @@ func getAvailableControllers() ([]string, error) {
9999
return controllers, nil
100100
}
101101

102-
// AvailableControllers get string:bool map of all the available controllers.
103-
func AvailableControllers(exclude map[string]controllerHandler) ([]string, error) {
104-
return getAvailableControllers()
105-
}
106-
107102
func getCgroupPathForCurrentProcess() (string, error) {
108103
path := fmt.Sprintf("/proc/%d/cgroup", os.Getpid())
109104
f, err := os.Open(path)

0 commit comments

Comments
 (0)