mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 13:05:27 +00:00
conf: domain: Split up formatting of <memtune> and <memoryBacking>
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
7596df34b4
commit
a06c856d43
@ -27985,6 +27985,17 @@ virDomainMemtuneFormat(virBufferPtr buf,
|
||||
|
||||
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)
|
||||
@ -28006,9 +28017,6 @@ virDomainMemtuneFormat(virBufferPtr buf,
|
||||
virBufferAddLit(&childBuf, "<discard/>\n");
|
||||
|
||||
virXMLFormatElement(buf, "memoryBacking", NULL, &childBuf);
|
||||
|
||||
ret = 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@ -28484,6 +28492,8 @@ virDomainDefFormatInternalSetRootName(virDomainDefPtr def,
|
||||
if (virDomainMemtuneFormat(buf, &def->mem) < 0)
|
||||
goto error;
|
||||
|
||||
virDomainMemorybackingFormat(buf, &def->mem);
|
||||
|
||||
if (virDomainCpuDefFormat(buf, def) < 0)
|
||||
goto error;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user