]> xenbits.xensource.com Git - libvirt.git/commit
conf: Remove virDomainResctrlAppend and introduce virDomainResctrlNew
authorWang Huaqiang <huaqiang.wang@intel.com>
Mon, 12 Nov 2018 13:31:43 +0000 (21:31 +0800)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 14 Nov 2018 17:18:46 +0000 (12:18 -0500)
commita54824e7d0a4aed5d0c154a132528810264ac217
treea0bad6a38ae3f4deaf9772d9a3bf591dfa9e8933
parent3f2214c2cdd9751df92ec9aa801e6161fa1a7009
conf: Remove virDomainResctrlAppend and introduce virDomainResctrlNew

Introduced virDomainResctrlNew to do the most part of virDomainResctrlAppend
and move the operation of appending resctrl to @def->resctrls out of
function.

Rather than rely on virDomainResctrlAppend to perform the allocation, move
the onus to the caller and make use of virBitmapNewCopy for @vcpus and
virObjectRef for @alloc, thus removing the need to set each to NULL after the
call.

Signed-off-by: Wang Huaqiang <huaqiang.wang@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/conf/domain_conf.c