[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCHv2] cpustat: fix regression when cpus are offline



On 10/26/2012 02:50 PM, Peter Krempa wrote:
>>
>> +int
>> +nodeGetCPUCount(void)
>> +{
>> +#ifdef __linux__
>> +    /* XXX should we also work on older kernels, like RHEL5, that lack
>> +     * cpu/present and cpu/online files?  Those kernels also lack cpu
>> +     * hotplugging, so it would be a matter of finding the largest
>> +     * cpu/cpuNN directory, and returning NN + 1 */
>> +    return linuxParseCPUmax(SYSFS_SYSTEM_PATH "/cpu/present");
>> +#else
>> +    virReportError(VIR_ERR_NO_SUPPORT, "%s",
>> +                   _("host cpu counting not implemented on this
>> platform"));
>> +    return NULL;
> 
> s/NULL/-1/

Oops - copy-n-paste from nodeGetCPUBitmap, and on the untested arm of
#if.  Fixed...

> 
> ACK with the nit fixed.

...and pushed.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]