[libvirt] [PATCHv2] cpustat: fix regression when cpus are offline
Eric Blake
eblake at redhat.com
Fri Oct 26 21:37:57 UTC 2012
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 at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121026/dbd465c2/attachment-0001.sig>
More information about the libvir-list
mailing list