
On 10/10/2012 10:02 PM, Osier Yang wrote:
Are you interested in writing patches to implement this new API, if others agree with my alternate single-API signature?
Agreed. A single-API and allocating the cpumap inside libvirt without the need to known the maplen avoids the race.
But a flags support won't bite us, assuming someone just want to get the cpumap of the onlined CPUs, or offlined CPUs.
Indeed, shame on me for not remember a flags argument for any possible future extensions.
So how about:
int virNodeGetCpuMap(virConnectPtr conn, unsigned char **cpumap, unsigned int flags);
Yes, that's better, even if flags must always be 0 for now. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org