mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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=1741837 Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
c854e0bd33
commit
23689cddd4
@ -1582,8 +1582,10 @@ virCgroupV2GetCpuCfsQuota(virCgroupPtr group,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (STREQLEN(str, "max", 3))
|
if (STREQLEN(str, "max", 3)) {
|
||||||
*cfs_quota = ULLONG_MAX / 1000;
|
*cfs_quota = ULLONG_MAX / 1000;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (virStrToLong_ll(str, &str, 10, cfs_quota) < 0) {
|
if (virStrToLong_ll(str, &str, 10, cfs_quota) < 0) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
|
Loading…
Reference in New Issue
Block a user