Re: [libvirt] [PATCH 6/4] nodeinfo: port nodecpumap to RHEL5

2012-11-16 Thread Eric Blake
On 11/16/2012 09:57 AM, Viktor Mihajlovski wrote: > On 11/15/2012 04:38 PM, Eric Blake wrote: >> -cpumap = linuxParseCPUmap(present, SYSFS_SYSTEM_PATH "/cpu/online"); >> + >> +if (virFileExists(SYSFS_SYSTEM_PATH "/cpu/online")) { >> +cpumap = linuxParseCPUmap(present, SYSFS_SYSTEM_P

Re: [libvirt] [PATCH 6/4] nodeinfo: port nodecpumap to RHEL5

2012-11-16 Thread Viktor Mihajlovski
On 11/15/2012 04:38 PM, Eric Blake wrote: -cpumap = linuxParseCPUmap(present, SYSFS_SYSTEM_PATH "/cpu/online"); + +if (virFileExists(SYSFS_SYSTEM_PATH "/cpu/online")) { +cpumap = linuxParseCPUmap(present, SYSFS_SYSTEM_PATH "/cpu/online"); +} else { +int i; + +c

[libvirt] [PATCH 6/4] nodeinfo: port nodecpumap to RHEL5

2012-11-15 Thread Eric Blake
Prior to this patch, 'virsh nodecpumap' on older kernels reported: error: Unable to get cpu map error: out of memory * src/nodeinfo.c (linuxParseCPUmax): Don't overwrite error. (nodeGetCPUBitmap): Provide backup implementation. --- src/nodeinfo.c | 33 +++-- 1 file cha