[libvirt] [PATCH v1 1/4] Introduce virDomain{Get,Set}Time APIs

Ján Tomko jtomko at redhat.com
Fri Feb 14 08:10:17 UTC 2014


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 at redhat.com>
> ---
>  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.

> +                     unsigned int flags);
> +
>  /**
>   * virSchedParameterType:
>   *

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140214/5ec0c2ab/attachment-0001.sig>


More information about the libvir-list mailing list