WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Set localtime, enable_audio, clock_offset

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Set localtime, enable_audio, clock_offset, and std_vga back to being bools, not
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 03 Dec 2006 15:10:15 +0000
Delivery-date: Sun, 03 Dec 2006 07:09:58 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID 056050ceb30090ad46f88e974e79864a0ddb346a
# Parent  3570295a44cb48203ced895e2a0e898789edf95d
Set localtime, enable_audio, clock_offset, and std_vga back to being bools, not
ints.  This is a recent breakage.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff -r 3570295a44cb -r 056050ceb300 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Fri Dec 01 13:07:19 2006 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Fri Dec 01 13:08:36 2006 +0000
@@ -56,6 +56,11 @@ xroot = XendRoot.instance()
 
 log = logging.getLogger("xend.XendDomainInfo")
 #log.setLevel(logging.TRACE)
+
+
+def bool0(v):
+    v != "0" and bool(v)
+
 
 ##
 # All parameters of VMs that may be configured on-the-fly, or at start-up.
@@ -87,7 +92,7 @@ ROUNDTRIPPING_CONFIG_ENTRIES = [
     ('bootloader',      str),
     ('bootloader_args', str),
     ('features',        str),
-    ('localtime',       int),
+    ('localtime',       bool0),
     ]
 
 ROUNDTRIPPING_CONFIG_ENTRIES += VM_CONFIG_PARAMS
@@ -1323,8 +1328,8 @@ class XendDomainInfo:
                                       self.info['image'],
                                       self.info['devices'])
 
-            localtime = self.info.get('localtime', 0)
-            if localtime is not None and localtime == 1:
+            localtime = self.info.get('localtime', False)
+            if localtime:
                 xc.domain_set_time_offset(self.domid)
 
             xc.domain_setcpuweight(self.domid, self.info['cpu_weight'])
@@ -1780,17 +1785,17 @@ class XendDomainInfo:
     def get_bios_boot(self):
         return '' # TODO
     def get_platform_std_vga(self):
-        return self.info.get('platform_std_vga', 0)    
+        return self.info.get('platform_std_vga', False)    
     def get_platform_keymap(self):
         return ''
     def get_platform_serial(self):
         return self.info.get('platform_serial', '')
     def get_platform_localtime(self):
-        return self.info.get('platform_localtime', 0)
+        return self.info.get('platform_localtime', False)
     def get_platform_clock_offset(self):
-        return self.info.get('platform_clock_offset', 0)
+        return self.info.get('platform_clock_offset', False)
     def get_platform_enable_audio(self):
-        return self.info.get('platform_enable_audio', 0)
+        return self.info.get('platform_enable_audio', False)
     def get_platform_keymap(self):
         return self.info.get('platform_keymap', '')
     def get_builder(self):

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Set localtime, enable_audio, clock_offset, and std_vga back to being bools, not, Xen patchbot-unstable <=