mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 14:35:25 +00:00
qemu: domain: Split out commandline namespace data formatting
Separate it from qemuDomainDefNamespaceFormatXML. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
8b0a389d2b
commit
f1ded974c3
@ -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,
|
|||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user