mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Add new clock mode allowing variable adjustments
This introduces a third option for clock offset synchronization, that allows an arbitrary / variable adjustment to be set. In essence the XML contains the time delta in seconds, relative to UTC. <clock offset='variable' adjustment='123465'/> The difference from 'utc' mode, is that management apps should track adjustments and preserve them at next reboot. * docs/schemas/domain.rng: Schema for new clock mode * src/conf/domain_conf.c, src/conf/domain_conf.h: Parse new clock time delta * src/libvirt_private.syms, src/util/xml.c, src/util/xml.h: Add virXPathLongLong() method
This commit is contained in:
@@ -297,12 +297,24 @@
|
||||
<define name="clock">
|
||||
<optional>
|
||||
<element name="clock">
|
||||
<attribute name="offset">
|
||||
<choice>
|
||||
<choice>
|
||||
<attribute name="offset">
|
||||
<value>localtime</value>
|
||||
</attribute>
|
||||
<attribute name="offset">
|
||||
<value>utc</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</attribute>
|
||||
<group>
|
||||
<attribute name="offset">
|
||||
<value>variable</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="adjustment">
|
||||
<ref name="timeDelta"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</group>
|
||||
</choice>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
@@ -1616,4 +1628,9 @@
|
||||
<param name='pattern'>[a-zA-Z0-9\-_]+</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="timeDelta">
|
||||
<data type="string">
|
||||
<param name="pattern">(-|\+)?[0-9]+</param>
|
||||
</data>
|
||||
</define>
|
||||
</grammar>
|
||||
|
||||
Reference in New Issue
Block a user