Skip to content

Commit 7bd9ea7

Browse files
committed
helpers: handle cgroup v2 "max" value
when the "max" value is found handle it as math.MaxUint64. Signed-off-by: Giuseppe Scrivano <[email protected]>
1 parent cf79551 commit 7bd9ea7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

container/common/helpers.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,10 @@ func readString(dirpath string, file string) string {
203203

204204
func readUInt64(dirpath string, file string) uint64 {
205205
out := readString(dirpath, file)
206-
if out == "" || out == "max" {
206+
if out == "max" {
207+
return math.MaxUint64
208+
}
209+
if out == "" {
207210
return 0
208211
}
209212

0 commit comments

Comments
 (0)