mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 15:15:25 +00:00
conf: Remove unnecessary condition from virDomainDiskSourceFormatInternal
Now that the function is using virXMLFormatElement we don't need to conditionally format anything, since we'll format the element according to the presence of content. Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
9265b54d93
commit
bbacd6b113
@ -22832,7 +22832,6 @@ virDomainDiskSourceFormatInternal(virBufferPtr buf,
|
|||||||
if (policy)
|
if (policy)
|
||||||
startupPolicy = virDomainStartupPolicyTypeToString(policy);
|
startupPolicy = virDomainStartupPolicyTypeToString(policy);
|
||||||
|
|
||||||
if (src->path || src->nhosts > 0 || src->srcpool || startupPolicy) {
|
|
||||||
switch ((virStorageType)src->type) {
|
switch ((virStorageType)src->type) {
|
||||||
case VIR_STORAGE_TYPE_FILE:
|
case VIR_STORAGE_TYPE_FILE:
|
||||||
virBufferEscapeString(&attrBuf, " file='%s'", src->path);
|
virBufferEscapeString(&attrBuf, " file='%s'", src->path);
|
||||||
@ -22906,7 +22905,6 @@ virDomainDiskSourceFormatInternal(virBufferPtr buf,
|
|||||||
|
|
||||||
if (virXMLFormatElement(buf, "source", &attrBuf, &childBuf) < 0)
|
if (virXMLFormatElement(buf, "source", &attrBuf, &childBuf) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user