Re: [PATCH 07/23] cpu: Return model from virCPUModelIsAllowed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 13, 2017 at 14:45:05 -0400, John Ferlan wrote:
> >> In any case, the 'ModelIsAllowed" now feels overloaded returning more
> >> than just true/false that a typical "Is" type function would return.
> >> Sorry, I don't have suggestions, so unless someone else is looking and
> >> has a better name, then just go with it.
> > 
> > Hmm, I have a suggestion. I should just create a separate function
> > virDomainCapsCPUModelsGet or *Find which would just return a pointer to
> > the CPU model structure from the models array and change
> > virCPUModelIsAllowed into a simple wrapper around the new function. The
> > callers which would pass non-NULL hvModel pointer would just call the
> > underlying virDomainCapsCPUModelsGet function directly.
> > 
> 
> That would seem to work and Get would perhaps also imply it's not a copy
> but rather a pointer to something existing.

Yeah, I think it looks better. See v2 of this series.

Jirka

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux