]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: Move iothread formatter into a separate function
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 16 May 2022 09:59:48 +0000 (11:59 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 10 Jun 2022 11:53:52 +0000 (13:53 +0200)
commitc4c57cef33df316d0af7d3e2e737e85eb3c89cd8
tree89fddc21504d13df44afd7488a200d01bc902919
parent13a8c0aa6140cf2d7cf3d4e6de34cad6391ca446
conf: Move iothread formatter into a separate function

Formatting iothreads is currently open coded inside of
virDomainDefFormatInternalSetRootName(). While this works, it
makes the function needlessly long, especially if the formatting
code will expand in near future. Therefore, move it into a
separate function. At the same time, make
virDomainDefIothreadShouldFormat() accept const domain definition
so that the new function can also accept const domain definition.
Formatters shouldn't need to change definition.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/conf/domain_conf.c