mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
virDomainBackupDiskDefFormat: Format internal disk state only when valid
Format the disk state only when it isn't _NONE. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
5c08a3739b
commit
1a7ce56ae1
@ -370,7 +370,7 @@ virDomainBackupDiskDefFormat(virBufferPtr buf,
|
|||||||
|
|
||||||
virBufferEscapeString(&attrBuf, " name='%s'", disk->name);
|
virBufferEscapeString(&attrBuf, " name='%s'", disk->name);
|
||||||
virBufferAsprintf(&attrBuf, " backup='%s'", virTristateBoolTypeToString(disk->backup));
|
virBufferAsprintf(&attrBuf, " backup='%s'", virTristateBoolTypeToString(disk->backup));
|
||||||
if (internal)
|
if (internal && disk->state != VIR_DOMAIN_BACKUP_DISK_STATE_NONE)
|
||||||
virBufferAsprintf(&attrBuf, " state='%s'", virDomainBackupDiskStateTypeToString(disk->state));
|
virBufferAsprintf(&attrBuf, " state='%s'", virDomainBackupDiskStateTypeToString(disk->state));
|
||||||
|
|
||||||
if (disk->backup == VIR_TRISTATE_BOOL_YES) {
|
if (disk->backup == VIR_TRISTATE_BOOL_YES) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user