util: Fix virCgroupGetMemoryStat
Commit 901d2b9c introduced virCgroupGetMemoryStat and replaced the LXC virLXCCgroupGetMemStat logic in commit e634c7cd. However, in doing so the replacement wasn't exact as the LXC logic used getline() to process the cgroup controller data, while the new virCgroupGetMemoryStat used "memory.stat" manual buffer read/ processing which neglected to forward through @line in order to read each line in the output. To fix that, we should be sure to carry forward the @line value for each line read updating it beyond that current @newLine value once we've calculated the values that we want. Signed-off-by: NPeter Chubb <peter.chubb@data61.csiro.au> Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
Showing
想要评论请 注册 或 登录