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

Re: [libvirt] [PATCH] Fix domxml-from-native xen-sxpr for domain/clock/@offset='localtime'



On 04/27/2011 07:20 AM, Philipp Hahn wrote:
At least Xen-3.4.3 translates the /vm/localtime SXPR value to
/domain/platform/localtime and /domain/image/{linux,hvm}/localtime when
the domain is defined.
When reading back that information libvirt still tries to read
/domain/localtime, which now isn't found anymore.
Instead domxml-from-native should read back /domain/platform/localtime.

This is tracked at<https://forge.univention.org/bugzilla/show_bug.cgi?id=22321>

Looking through old threads - is this patch still needed? It didn't apply cleanly for me.


Signed-off-by: Philipp Hahn<hahn univention de>
---
  src/xenxs/xen_sxpr.c |    7 +++++--
  1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/xenxs/xen_sxpr.c b/src/xenxs/xen_sxpr.c
index 0241695..5b997af 100644
--- a/src/xenxs/xen_sxpr.c
+++ b/src/xenxs/xen_sxpr.c
@@ -1194,12 +1194,15 @@ xenParseSxpr(const struct sexpr *root,
          if (sexpr_int(root, "domain/image/hvm/hap"))
              def->features |= (1<<  VIR_DOMAIN_FEATURE_HAP);

-        /* Old XenD only allows localtime here for HVM */
+        /* Old(?) XenD only allows localtime here for HVM */
          if (sexpr_int(root, "domain/image/hvm/localtime"))
              def->clock.offset = VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME;
      }

-    /* Current XenD allows localtime here, for PV and HVM */
+    /* XenD-3.4.3 allows localtime here, for PV and HVM */
+    if (sexpr_int(root, "domain/platform/localtime"))
+        def->clock.offset = VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME;
+    /* Current(?) XenD allows localtime here, for PV and HVM */
      if (sexpr_int(root, "domain/localtime"))
          def->clock.offset = VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME;


--
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


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