mirror of
https://github.com/containers/podman.git
synced 2025-11-29 01:28:22 +08:00
libpod/util_linux.go: Remove Cgroups v1
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit is contained in:
@@ -21,13 +21,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func cgroupExist(path string) bool {
|
func cgroupExist(path string) bool {
|
||||||
cgroupv2, _ := cgroups.IsCgroup2UnifiedMode()
|
fullPath := filepath.Join("/sys/fs/cgroup", path)
|
||||||
var fullPath string
|
|
||||||
if cgroupv2 {
|
|
||||||
fullPath = filepath.Join("/sys/fs/cgroup", path)
|
|
||||||
} else {
|
|
||||||
fullPath = filepath.Join("/sys/fs/cgroup/memory", path)
|
|
||||||
}
|
|
||||||
return fileutils.Exists(fullPath) == nil
|
return fileutils.Exists(fullPath) == nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user