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>
qemuDomainObjPrivateXMLFormatAllowReboot(virBuffer *buf,
virTristateBool allowReboot)
{
- virBufferAsprintf(buf, "<allowReboot value='%s'/>\n",
- virTristateBoolTypeToString(allowReboot));
-
+ if (allowReboot) {
+ virBufferAsprintf(buf, "<allowReboot value='%s'/>\n",
+ virTristateBoolTypeToString(allowReboot));
+ }
}