Re: [PATCH 1/2] domain: add tsc.on_reboot element

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux