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

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

 



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@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]