Terminate backing chains explicitly

Express a properly terminated backing chain by putting a
virStorageSource of type VIR_STORAGE_TYPE_NONE in the chain. The newly
used helpers simplify this greatly.

The change fixes a bug as formatting an incomplete backing chain and
parsing it back would end up in expressing a terminated chain since
src->backingStoreRaw was not populated. By relying on the terminator
object this can be now processed appropriately.
This commit is contained in:
Peter Krempa
2017-10-17 06:19:18 +02:00
parent 0a294a8e28
commit a693fdba01
71 changed files with 46 additions and 162 deletions
@@ -18,7 +18,6 @@
<disk type='block' device='disk'>
<driver name='phy'/>
<source dev='/dev/MainVG/GuestVG'/>
<backingStore/>
<target dev='xvda' bus='xen'/>
</disk>
<console type='pty'>