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

qemu: domain: Split out commandline namespace data formatting

Separate it from qemuDomainDefNamespaceFormatXML.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 8b0a389d
...@@ -3228,15 +3228,15 @@ qemuDomainDefNamespaceParse(xmlDocPtr xml ATTRIBUTE_UNUSED, ...@@ -3228,15 +3228,15 @@ qemuDomainDefNamespaceParse(xmlDocPtr xml ATTRIBUTE_UNUSED,
return ret; return ret;
} }
static int
qemuDomainDefNamespaceFormatXML(virBufferPtr buf, static void
void *nsdata) qemuDomainDefNamespaceFormatXMLCommandline(virBufferPtr buf,
qemuDomainXmlNsDefPtr cmd)
{ {
qemuDomainXmlNsDefPtr cmd = nsdata;
size_t i; size_t i;
if (!cmd->num_args && !cmd->num_env) if (!cmd->num_args && !cmd->num_env)
return 0; return;
virBufferAddLit(buf, "<qemu:commandline>\n"); virBufferAddLit(buf, "<qemu:commandline>\n");
virBufferAdjustIndent(buf, 2); virBufferAdjustIndent(buf, 2);
...@@ -3253,6 +3253,17 @@ qemuDomainDefNamespaceFormatXML(virBufferPtr buf, ...@@ -3253,6 +3253,17 @@ qemuDomainDefNamespaceFormatXML(virBufferPtr buf,
virBufferAdjustIndent(buf, -2); virBufferAdjustIndent(buf, -2);
virBufferAddLit(buf, "</qemu:commandline>\n"); virBufferAddLit(buf, "</qemu:commandline>\n");
}
static int
qemuDomainDefNamespaceFormatXML(virBufferPtr buf,
void *nsdata)
{
qemuDomainXmlNsDefPtr cmd = nsdata;
qemuDomainDefNamespaceFormatXMLCommandline(buf, cmd);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册