[libvirt] [PATCH 05/10] nodeinfo: Add out parameter to nodeGetPresentCPUBitmap()

Andrea Bolognani abologna at redhat.com
Mon Jul 20 14:07:42 UTC 2015


On Mon, 2015-07-20 at 15:15 +0200, Peter Krempa wrote:
> 
> > -virBitmapPtr nodeGetPresentCPUBitmap(const char *sysfs_prefix);
> > -virBitmapPtr nodeGetCPUBitmap(const char *sysfs_prefix, int 
> > *max_id);
> > +virBitmapPtr nodeGetPresentCPUBitmap(const char *sysfs_prefix,
> > +                                     int *size);
> > +virBitmapPtr nodeGetCPUBitmap(const char *sysfs_prefix,
> > +                              int *size);
> 
> I'd prefer something like "ncpus" or maxcpu rather than size. For
> getting size virBitmapSize() is totally apropriate.

I've used "size" on purpose, because I didn't want people to
mistake that for a count of online or present CPUs: it's the
size of the returned bitmap, same value you'd get if you
called virBitmapSize() on it.

Sounds reasonable?

Cheers.

-- 
Andrea Bolognani
Software Engineer - Virtualization Team




More information about the libvir-list mailing list