mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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>
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
<volume type='netdir'>
|
||||
<name>dir</name>
|
||||
<key>vol/dir</key>
|
||||
<source>
|
||||
</source>
|
||||
<capacity unit='bytes'>0</capacity>
|
||||
<allocation unit='bytes'>0</allocation>
|
||||
<target>
|
||||
|
||||
Reference in New Issue
Block a user