]> git.ipfire.org Git - thirdparty/libvirt.git/commit
capabilities: Separate <cpu/> formatting into a function
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 26 May 2021 13:39:38 +0000 (15:39 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 15 Jun 2021 08:41:22 +0000 (10:41 +0200)
commitd6a6ed94f2ef945c21924acd17368fbbf8032d6d
tree1b43ff7dd878ed59459bc0e75adbc930e3fac881
parent137e765891052d768fd75e888c9b4c505b17021f
capabilities: Separate <cpu/> formatting into a function

The way we format <cpu/> element for capabilities is not ideal,
because if there are no CPUs, i.e. no child elements, we still
output opening and closing element. To solve this,
virXMLFormatElement() could be used but that would introduce more
variables into the loop. Therefore, move the formatter into a
separate function and use virXMLFormatElement().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
src/conf/capabilities.c