On 3/25/22 16:35, Michal Prívozník wrote:
> @@ -12080,6 +12088,15 @@ virDomainTimerDefParseXML(xmlNodePtr
node,
> }
> }
>
> + reboot = virXMLPropString(node, "on_reboot");
> + if (reboot != NULL) {
> + if ((def->reboot = virDomainTimerRebootModeTypeFromString(reboot)) <=
0) {
> + virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
> + _("unknown timer reboot mode '%s'"),
reboot);
> + goto error;
> + }
> + }
I know you just mimicked what is done for @mode attribute, but we have
this nice brand new virXMLPropEnum() which fits perfectly here as it
encapsulates these lines.
Huh, after I've merged your patches and started rebasing my local
branches I've realized I have a branch that switches this code to
virXMLPropEnum(). I don't remember why I haven't sent it yet.
Michal