diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 72d5f289c6..42e7596ac2 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -24019,14 +24019,18 @@ virDomainChrTargetDefFormat(virBufferPtr buf, return -1; } + virBufferAddLit(buf, "targetType != VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE) { virBufferAsprintf(buf, - "\n", - targetType, - def->target.port); - break; + "type='%s' ", + targetType); } - ATTRIBUTE_FALLTHROUGH; + + virBufferAsprintf(buf, + "port='%d'/>\n", + def->target.port); + break; case VIR_DOMAIN_CHR_DEVICE_TYPE_PARALLEL: virBufferAsprintf(buf, "\n",