Format the disk state only when it isn't _NONE.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/conf/backup_conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/conf/backup_conf.c b/src/conf/backup_conf.c
index 781dd53f6b..5e4144d371 100644
--- a/src/conf/backup_conf.c
+++ b/src/conf/backup_conf.c
@@ -370,7 +370,7 @@ virDomainBackupDiskDefFormat(virBufferPtr buf,
virBufferEscapeString(&attrBuf, " name='%s'", disk->name);
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));
if (disk->backup == VIR_TRISTATE_BOOL_YES) {
--
2.26.2