]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virStorageVolDefFormat: Don't format empty <source>
authorPeter Krempa <pkrempa@redhat.com>
Thu, 25 Feb 2021 13:11:05 +0000 (14:11 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 1 Mar 2021 14:44:47 +0000 (15:44 +0100)
commit6423e3082835db932dd285f3ae75b5dad9d91c83
tree1f769a8b1ad28c993a2c5f1f57104896d1546d03
parent80d9ef806877b7c58bfaec1a59db29fa553ef152
virStorageVolDefFormat: Don't format empty <source>

If there are no source extents the volume XML has an empty <source>
element. Remove it if there's nothing in it by using
virXMLFormatElement.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
21 files changed:
src/conf/storage_conf.c
tests/storagevolxml2xmlout/vol-file-backing.xml
tests/storagevolxml2xmlout/vol-file-iso.xml
tests/storagevolxml2xmlout/vol-file-naming.xml
tests/storagevolxml2xmlout/vol-file.xml
tests/storagevolxml2xmlout/vol-gluster-dir-neg-uid.xml
tests/storagevolxml2xmlout/vol-gluster-dir.xml
tests/storagevolxml2xmlout/vol-logical-backing.xml
tests/storagevolxml2xmlout/vol-logical.xml
tests/storagevolxml2xmlout/vol-luks-cipher.xml
tests/storagevolxml2xmlout/vol-luks.xml
tests/storagevolxml2xmlout/vol-partition.xml
tests/storagevolxml2xmlout/vol-qcow2-0.10-lazy.xml
tests/storagevolxml2xmlout/vol-qcow2-1.1.xml
tests/storagevolxml2xmlout/vol-qcow2-encryption.xml
tests/storagevolxml2xmlout/vol-qcow2-lazy.xml
tests/storagevolxml2xmlout/vol-qcow2-luks.xml
tests/storagevolxml2xmlout/vol-qcow2-nobacking.xml
tests/storagevolxml2xmlout/vol-qcow2-nocapacity.xml
tests/storagevolxml2xmlout/vol-qcow2.xml
tests/storagevolxml2xmlout/vol-sheepdog.xml