提交 f2316d8d 编写于 作者: P Peter Krempa

conf: domaincaps: Use virXMLFormatElement in virDomainCapsFormatFeatures

Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 8bc9131b
......@@ -597,16 +597,14 @@ static void
virDomainCapsFormatFeatures(const virDomainCaps *caps,
virBufferPtr buf)
{
virBufferAddLit(buf, "<features>\n");
virBufferAdjustIndent(buf, 2);
g_auto(virBuffer) childBuf = VIR_BUFFER_INIT_CHILD(buf);
virDomainCapsFeatureGICFormat(buf, &caps->gic);
qemuDomainCapsFeatureFormatSimple(buf, "vmcoreinfo", caps->vmcoreinfo);
qemuDomainCapsFeatureFormatSimple(buf, "genid", caps->genid);
virDomainCapsFeatureSEVFormat(buf, caps->sev);
virDomainCapsFeatureGICFormat(&childBuf, &caps->gic);
qemuDomainCapsFeatureFormatSimple(&childBuf, "vmcoreinfo", caps->vmcoreinfo);
qemuDomainCapsFeatureFormatSimple(&childBuf, "genid", caps->genid);
virDomainCapsFeatureSEVFormat(&childBuf, caps->sev);
virBufferAdjustIndent(buf, -2);
virBufferAddLit(buf, "</features>\n");
virXMLFormatElement(buf, "features", NULL, &childBuf);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册