libct/cgroups/utils: getControllerPath return err for v2

This function is not used and were never used in any cgroupv2 code.

To have it stay that way, let it return error in case it's called
for v2.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin 2020-05-14 19:12:54 -07:00
parent 55c77cb9f3
commit 3834222d88
1 changed files with 1 additions and 1 deletions

View File

@ -418,7 +418,7 @@ func parseCgroupFromReader(r io.Reader) (map[string]string, error) {
func getControllerPath(subsystem string, cgroups map[string]string) (string, error) {
if IsCgroup2UnifiedMode() {
return "/", nil
return "", errUnified
}
if p, ok := cgroups[subsystem]; ok {