On 14.02.2014 09:10, Ján Tomko wrote:
On 02/13/2014 07:51 PM, Michal Privoznik wrote:
These APIs allow users to get or set time in a domain, which may come
handy if the domain has been resumed just recently and NTP is not
configured or hasn't kicked in yet and the guest is running
something time critical. In addition, NTP may refuse to re-set the clock
if the skew is too big.
Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
include/libvirt/libvirt.h.in | 13 +++++++
src/driver.h | 13 +++++++
src/libvirt.c | 91 ++++++++++++++++++++++++++++++++++++++++++++
src/libvirt_public.syms | 6 +++
4 files changed, 123 insertions(+)
+int virDomainGetTime(virDomainPtr dom,
+ long long *time,
+ unsigned int flags);
+
+typedef enum {
+ VIR_DOMAIN_TIME_SYNC = (1 << 0), /* Re-sync domain time from domain's RTC */
+} virDomainSetTimeFlags;
+
+int virDomainSetTime(virDomainPtr dom,
+ long long time,
+ const char *timezone,
Both 'time' and 'timezone' generate a warning about shadowed global
declaration with older GCC.
Sigh. That's another case where a syntax-check rule prohibiting some
variable names would be useful.
Michal
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list