提交 23689cdd 编写于 作者: P Pavel Hrdina

vircgroupv2: fix virCgroupV2GetCpuCfsQuota for "max" value

If the first value in cpu.max is "max" return from function.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1741837Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
上级 c854e0bd
......@@ -1582,8 +1582,10 @@ virCgroupV2GetCpuCfsQuota(virCgroupPtr group,
return -1;
}
if (STREQLEN(str, "max", 3))
if (STREQLEN(str, "max", 3)) {
*cfs_quota = ULLONG_MAX / 1000;
return 0;
}
if (virStrToLong_ll(str, &str, 10, cfs_quota) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册