mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
9223ebbc85
In a recent commit I've attempted to rewrite the XML generator to use virXMLFormatElement instead of manual steps. Unfortunately the commit had multiple problems resulting in a garbled XML: 1) in certain cases the wrong buffer was used resulting in misplaced snippets 2) the child element buffer was improperly set up so sub-elements were not indented This resulted in following XML being generated: $ virsh blockcopy cd vda /tmp/test.copy --raw --print-xml type='file''/tmp/test.copy'/> <driver type='raw'/> <disk> <source file=</disk> To fix this we'll generate the '<source>' element in one go and use the proper buffer for it and other places. Fixes: 1cd95f858ab83f2baab0e35070d00766bb06ce3a Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2078274 Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>