Re: [PATCH] util: virhostcpu: Fail when fetching CPU Stats for invalid cpu

2020-03-24 Thread Michal Prívozník
On 21. 2. 2020 19:10, Mauro S. M. Rodrigues wrote: > virHostCPUGetStatsLinux walks through every cpu in /proc/stat until it > finds cpu%cpuNum that matches with the requested cpu. > If none is found it logs the error but it should return -1, instead of 0. > Otherwise virsh nodecpustats --cpu and A

Re: [PATCH] util: virhostcpu: Fail when fetching CPU Stats for invalid cpu

2020-03-23 Thread Christian Ehrhardt
On Fri, Feb 21, 2020 at 7:11 PM Mauro S. M. Rodrigues < maur...@linux.vnet.ibm.com> wrote: > virHostCPUGetStatsLinux walks through every cpu in /proc/stat until it > finds cpu%cpuNum that matches with the requested cpu. > If none is found it logs the error but it should return -1, instead of 0. >

[PATCH] util: virhostcpu: Fail when fetching CPU Stats for invalid cpu

2020-02-21 Thread Mauro S. M. Rodrigues
virHostCPUGetStatsLinux walks through every cpu in /proc/stat until it finds cpu%cpuNum that matches with the requested cpu. If none is found it logs the error but it should return -1, instead of 0. Otherwise virsh nodecpustats --cpu and API bindings don't fail properly, printing a blank line inst