On Fri, Mar 06, 2015 at 08:07:56AM -0500, John Ferlan wrote: > > > > The maplen is not needed. Just pass 'hostcpus' to > > 'virProcessGetAffinity' and it will generate a virBitmap of the right > > size, then virBitmapToData computes the correct maplen. > > > >> + maxcpu = maplen * 8; > >> + if (maxcpu > hostcpus) > > > > These two lines are redundant. > > If maplen * 8 < hostcpus, then VIR_CPU_MAPLEN is flawed, because the map > > does not hold at least hostcpus bits. > > If maplen * 8 >= hostcpus, the value of hostcpus is used. > > > > Hmm... I'll have to go back and look again as this was pretty much > following the VcpuPin or EmulatorPin examples with a touch of GetCPUMap > since this code returns the cpumap rather than expecting one on input. > Those are terrible examples long overdue for a cleanup. Jan
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list