diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index f1b2447def..cc5e79b70b 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -21671,13 +21671,14 @@ virDomainSourceDefFormatSeclabel(virBufferPtr buf,
static int
-virDomainDiskSourceFormatNetwork(virBufferPtr buf,
+virDomainDiskSourceFormatNetwork(virBufferPtr attrBuf,
+ virBufferPtr childBuf,
virStorageSourcePtr src)
{
size_t n;
char *path = NULL;
- virBufferAsprintf(buf, "\n");
+ virBufferEscapeString(childBuf, " socket='%s'", src->hosts[n].socket);
+ virBufferAddLit(childBuf, "/>\n");
}
+ virBufferEscapeString(childBuf, "\n", src->snapshot);
+ virBufferEscapeString(childBuf, "\n", src->configFile);
+
return 0;
}
@@ -21763,7 +21754,7 @@ virDomainDiskSourceFormatInternal(virBufferPtr buf,
break;
case VIR_STORAGE_TYPE_NETWORK:
- if (virDomainDiskSourceFormatNetwork(buf, src) < 0)
+ if (virDomainDiskSourceFormatNetwork(&attrBuf, &childBuf, src) < 0)
goto error;
break;