virXMLFormatElement(buf, "memtune", NULL, &childBuf);
+ ret = 0;
+ return ret;
+}
+
+
+static void
+virDomainMemorybackingFormat(virBufferPtr buf,
+ const virDomainMemtune *mem)
+{
+ g_auto(virBuffer) childBuf = VIR_BUFFER_INITIALIZER;
+
virBufferSetChildIndent(&childBuf, buf);
if (mem->nhugepages)
virBufferAddLit(&childBuf, "<discard/>\n");
virXMLFormatElement(buf, "memoryBacking", NULL, &childBuf);
-
- ret = 0;
- return ret;
}
if (virDomainMemtuneFormat(buf, &def->mem) < 0)
goto error;
+ virDomainMemorybackingFormat(buf, &def->mem);
+
if (virDomainCpuDefFormat(buf, def) < 0)
goto error;