mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
qemu: Format <allowReboot> conditionally
If the value is VIR_TRISTATE_BOOL_ABSENT we should just omit the element entirely. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
817aa45025
commit
c49651ac17
@ -2205,9 +2205,10 @@ void
|
||||
qemuDomainObjPrivateXMLFormatAllowReboot(virBuffer *buf,
|
||||
virTristateBool allowReboot)
|
||||
{
|
||||
virBufferAsprintf(buf, "<allowReboot value='%s'/>\n",
|
||||
virTristateBoolTypeToString(allowReboot));
|
||||
|
||||
if (allowReboot) {
|
||||
virBufferAsprintf(buf, "<allowReboot value='%s'/>\n",
|
||||
virTristateBoolTypeToString(allowReboot));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user