mirror of
https://github.com/containers/podman.git
synced 2025-11-30 01:58:46 +08:00
19 lines
322 B
Go
19 lines
322 B
Go
//go:build linux
|
|
|
|
package main
|
|
|
|
import (
|
|
"github.com/sirupsen/logrus"
|
|
"go.podman.io/common/pkg/cgroups"
|
|
)
|
|
|
|
func checkSupportedCgroups() {
|
|
unified, err := cgroups.IsCgroup2UnifiedMode()
|
|
if err != nil {
|
|
logrus.Fatalf("Error determining cgroups mode")
|
|
}
|
|
if !unified {
|
|
logrus.Fatalf("Cgroups v1 not supported")
|
|
}
|
|
}
|