[libvirt] [PATCH 23/41] conf: Introduce virCPUDefCopyWithoutModel

Jiri Denemark jdenemar at redhat.com
Wed Sep 14 13:38:16 UTC 2016


On Tue, Aug 30, 2016 at 10:23:10 -0400, John Ferlan wrote:
> 
> 
> On 08/12/2016 09:33 AM, Jiri Denemark wrote:
> > Useful for copying a CPU definition without model related parts (i.e.,
> > without model name, feature list, vendor).
> > 
> > Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> > ---
> >  src/conf/cpu_conf.c      | 16 +++++++++++++++-
> >  src/conf/cpu_conf.h      |  3 +++
> >  src/libvirt_private.syms |  1 +
> >  3 files changed, 19 insertions(+), 1 deletion(-)
> > '
> 
> suggestion - how about "virCPUDefSparseCopy" ?  Especially since nothing
> that requires a VIR_STRDUP is copied (e.g. vendor, vendor_id, features).

The API copies everything but the CPU model stuff (which can be copied
separately with virCPUDefCopyModel). I think virCPUDefCopyWithoutModel
is more explicit about what it does than virCPUDefSparseCopy or
something similarly generic.

Jirka




More information about the libvir-list mailing list