Re: [libvirt] [PATCH] qemu: fix an off-by-one error in qemuDomainGetPercpuStats

2013-02-20 Thread Guannan Ren
On 02/20/2013 11:25 PM, Eric Blake wrote: On 02/20/2013 04:51 AM, Guannan Ren wrote: The max value of number of cpus to compute(id) should not be equal or greater than max cpu number. The bug ocurrs when id value is equal to max cpu number which s/ocurrs/occurs/ leads to the off-by-one error

[libvirt] [PATCH] qemu: fix an off-by-one error in qemuDomainGetPercpuStats

2013-02-20 Thread Guannan Ren
The max value of number of cpus to compute(id) should not be equal or greater than max cpu number. The bug ocurrs when id value is equal to max cpu number which leads to the off-by-one error in the following for loop. # virsh cpu-stats guest --start 1 error: Failed to virDomainGetCPUStats()

Re: [libvirt] [PATCH] qemu: fix an off-by-one error in qemuDomainGetPercpuStats

2013-02-20 Thread Eric Blake
On 02/20/2013 04:51 AM, Guannan Ren wrote: The max value of number of cpus to compute(id) should not be equal or greater than max cpu number. The bug ocurrs when id value is equal to max cpu number which s/ocurrs/occurs/ leads to the off-by-one error in the following for loop. # virsh