mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +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)
|
||||
startupPolicy = virDomainStartupPolicyTypeToString(policy);
|
||||
|
||||
if (src->path || src->nhosts > 0 || src->srcpool || startupPolicy) {
|
||||
switch ((virStorageType)src->type) {
|
||||
case VIR_STORAGE_TYPE_FILE:
|
||||
virBufferEscapeString(&attrBuf, " file='%s'", src->path);
|
||||
@ -22906,7 +22905,6 @@ virDomainDiskSourceFormatInternal(virBufferPtr buf,
|
||||
|
||||
if (virXMLFormatElement(buf, "source", &attrBuf, &childBuf) < 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user