On 7/7/20 10:23 AM, Peter Krempa wrote:
Format the disk state only when it isn't _NONE. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/conf/backup_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Eric Blake <eblake@xxxxxxxxxx>
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));
Pre-existing long line; do we care?
if (disk->backup == VIR_TRISTATE_BOOL_YES) {
-- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org