Re: [PATCHv3 1/3] Support clock=variable relative to localtime

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

 



Hi,

forgot one line to commit

On Monday 06 February 2012 14:59:16 Philipp Hahn wrote:
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index aa4b32d..5508fc9 100644
...
> @@ -7467,10 +7471,52 @@ static virDomainDefPtr
> virDomainDefParseXML(virCapsPtr caps, def->clock.offset =
> VIR_DOMAIN_CLOCK_OFFSET_UTC;
>      }
>      switch (def->clock.offset) {
> +    case VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME:
> +    case VIR_DOMAIN_CLOCK_OFFSET_UTC:
> +        tmp = virXPathString("string(./clock/@adjustment)", ctxt);
> +        if (tmp) {
> +            if (STREQ(tmp, "reset")) {
> +                def->clock.data.utc_reset = true;
> +            } else {
> +                char *conv = NULL;
> +                unsigned long long val;
> +                val = strtoll(tmp, &conv, 10);
> +                if (conv == tmp || *conv != '\0') {
> +                    virDomainReportError(VIR_ERR_INTERNAL_ERROR,
> +                                         _("unknown clock adjustment
> '%s'"), tmp); +                    goto error;
> +                }
> +                switch (def->clock.offset) {
> +                case VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME:
> +                    def->clock.data.variable.basis =
> VIR_DOMAIN_CLOCK_BASIS_LOCALTIME; +                    break;
> +                case VIR_DOMAIN_CLOCK_OFFSET_UTC:
> +                    def->clock.data.variable.basis =
> VIR_DOMAIN_CLOCK_BASIS_UTC; +                    break;
> +                }
                def->clock.offset = VIR_DOMAIN_CLOCK_OFFSET_VARIABLE;
> +                def->clock.data.variable.adjustment = val;
> +            }
> +            VIR_FREE(tmp);
> +        } else {
> +            def->clock.data.utc_reset = false;
> +        }
> +        break;
> +

Sincerely
Philipp
-- 
Philipp Hahn           Open Source Software Engineer      hahn@xxxxxxxxxxxxx
Univention GmbH        Linux for Your Business        fon: +49 421 22 232- 0
Mary-Somerville-Str.1  D-28359 Bremen                 fax: +49 421 22 232-99
                                                   http://www.univention.de/

Attachment: signature.asc
Description: This is a digitally signed message part.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[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]