Skip to content

Commit 614789c

Browse files
DL1231arkamar
andauthored
Update packages/envd/internal/services/cgroups/cgroup2.go
Co-authored-by: Petr Vaněk <arkamar@atlas.cz>
1 parent 162bbda commit 614789c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/envd/internal/services/cgroups/cgroup2.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ func NewCgroup2Manager(opts ...Cgroup2ManagerOption) (*Cgroup2Manager, error) {
5959
if err := unix.Statfs(config.rootPath, &st); err != nil {
6060
return nil, fmt.Errorf("failed to statfs cgroup root %s: %w", config.rootPath, err)
6161
}
62-
const cgroup2SuperMagic = 0x63677270
63-
if st.Type != cgroup2SuperMagic {
62+
if st.Type != unix.CGROUP2_SUPER_MAGIC {
6463
return nil, fmt.Errorf("cgroup root %s is not a cgroup2 filesystem (type=0x%x)", config.rootPath, st.Type)
6564
}
6665

0 commit comments

Comments
 (0)