Skip to content

Commit 7f194fa

Browse files
committed
common/pkg/cgroups: replace getAvailableControllers by only caller
Signed-off-by: Lokesh Mandvekar <[email protected]>
1 parent 4df2b44 commit 7f194fa

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
@@ -64,8 +64,8 @@ var handlers = map[string]statFunc{
6464
Blkio: blkioStat,
6565
}
6666

67-
// getAvailableControllers get the available controllers.
68-
func getAvailableControllers() ([]string, error) {
67+
// AvailableControllers get string:bool map of all the available controllers.
68+
func AvailableControllers(exclude map[string]statFunc) ([]string, error) {
6969
controllers := []string{}
7070
controllersFile := filepath.Join(cgroupRoot, "cgroup.controllers")
7171

@@ -89,11 +89,6 @@ func getAvailableControllers() ([]string, error) {
8989
return controllers, nil
9090
}
9191

92-
// AvailableControllers get string:bool map of all the available controllers.
93-
func AvailableControllers(exclude map[string]statFunc) ([]string, error) {
94-
return getAvailableControllers()
95-
}
96-
9792
func getCgroupPathForCurrentProcess() (string, error) {
9893
path := fmt.Sprintf("/proc/%d/cgroup", os.Getpid())
9994
f, err := os.Open(path)

0 commit comments

Comments
 (0)