mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 15:15:25 +00:00
conf: Modify arguments passed to virDomainDiskBackingStoreFormat
Pass in 'src' rather than the backing store of it. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
d588981913
commit
08c4a54ec0
@ -23840,13 +23840,14 @@ virDomainDiskSourceFormat(virBufferPtr buf,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
virDomainDiskBackingStoreFormat(virBufferPtr buf,
|
virDomainDiskBackingStoreFormat(virBufferPtr buf,
|
||||||
virStorageSourcePtr backingStore,
|
virStorageSourcePtr src,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
VIR_AUTOCLEAN(virBuffer) attrBuf = VIR_BUFFER_INITIALIZER;
|
VIR_AUTOCLEAN(virBuffer) attrBuf = VIR_BUFFER_INITIALIZER;
|
||||||
VIR_AUTOCLEAN(virBuffer) childBuf = VIR_BUFFER_INITIALIZER;
|
VIR_AUTOCLEAN(virBuffer) childBuf = VIR_BUFFER_INITIALIZER;
|
||||||
bool inactive = flags & VIR_DOMAIN_DEF_FORMAT_INACTIVE;
|
bool inactive = flags & VIR_DOMAIN_DEF_FORMAT_INACTIVE;
|
||||||
|
virStorageSourcePtr backingStore = src->backingStore;
|
||||||
|
|
||||||
virBufferSetChildIndent(&childBuf, buf);
|
virBufferSetChildIndent(&childBuf, buf);
|
||||||
|
|
||||||
@ -23879,8 +23880,7 @@ virDomainDiskBackingStoreFormat(virBufferPtr buf,
|
|||||||
if (virDomainDiskSourceFormat(&childBuf, backingStore, 0, false, flags, xmlopt) < 0)
|
if (virDomainDiskSourceFormat(&childBuf, backingStore, 0, false, flags, xmlopt) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (virDomainDiskBackingStoreFormat(&childBuf, backingStore->backingStore,
|
if (virDomainDiskBackingStoreFormat(&childBuf, backingStore, xmlopt, flags) < 0)
|
||||||
xmlopt, flags) < 0)
|
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (virXMLFormatElement(buf, "backingStore", &attrBuf, &childBuf) < 0)
|
if (virXMLFormatElement(buf, "backingStore", &attrBuf, &childBuf) < 0)
|
||||||
@ -24142,8 +24142,7 @@ virDomainDiskDefFormat(virBufferPtr buf,
|
|||||||
|
|
||||||
/* Don't format backingStore to inactive XMLs until the code for
|
/* Don't format backingStore to inactive XMLs until the code for
|
||||||
* persistent storage of backing chains is ready. */
|
* persistent storage of backing chains is ready. */
|
||||||
if (virDomainDiskBackingStoreFormat(buf, def->src->backingStore,
|
if (virDomainDiskBackingStoreFormat(buf, def->src, xmlopt, flags) < 0)
|
||||||
xmlopt, flags) < 0)
|
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
virBufferEscapeString(buf, "<backenddomain name='%s'/>\n", def->domain_name);
|
virBufferEscapeString(buf, "<backenddomain name='%s'/>\n", def->domain_name);
|
||||||
|
Loading…
Reference in New Issue
Block a user