]> xenbits.xensource.com Git - libvirt.git/commit
conf: Add callbacks that allocate per-def private data
authorPeter Krempa <pkrempa@redhat.com>
Tue, 15 Aug 2017 13:18:51 +0000 (15:18 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 18 Aug 2017 13:07:44 +0000 (15:07 +0200)
commite168bc8a72ce884027adeb755f8d891e353363dd
tree5d8ddf8f86df051e169ea581108259c3ee1a863a
parent03132bf487a905996287fa2a830ff3d3a93db822
conf: Add callbacks that allocate per-def private data

Some drivers use def-specific private data across callbacks (e.g.
qemuCaps in the qemu driver). Currently it's mostly allocated in every
single callback. This is rather wasteful, given that every single call
to the device callback allocates it.

The new callback will allocate the data (if not provided externally) and
then use it for the VM, address and device post parse callbacks.
src/conf/domain_conf.c
src/conf/domain_conf.h