ia64/xen-unstable

changeset 12730:056050ceb300

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@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Fri Dec 01 13:08:36 2006 +0000 (2006-12-01)
parents 3570295a44cb
children dfaf8493a211
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Fri Dec 01 13:07:19 2006 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Fri Dec 01 13:08:36 2006 +0000
     1.3 @@ -57,6 +57,11 @@ xroot = XendRoot.instance()
     1.4  log = logging.getLogger("xend.XendDomainInfo")
     1.5  #log.setLevel(logging.TRACE)
     1.6  
     1.7 +
     1.8 +def bool0(v):
     1.9 +    v != "0" and bool(v)
    1.10 +
    1.11 +
    1.12  ##
    1.13  # All parameters of VMs that may be configured on-the-fly, or at start-up.
    1.14  # 
    1.15 @@ -87,7 +92,7 @@ ROUNDTRIPPING_CONFIG_ENTRIES = [
    1.16      ('bootloader',      str),
    1.17      ('bootloader_args', str),
    1.18      ('features',        str),
    1.19 -    ('localtime',       int),
    1.20 +    ('localtime',       bool0),
    1.21      ]
    1.22  
    1.23  ROUNDTRIPPING_CONFIG_ENTRIES += VM_CONFIG_PARAMS
    1.24 @@ -1323,8 +1328,8 @@ class XendDomainInfo:
    1.25                                        self.info['image'],
    1.26                                        self.info['devices'])
    1.27  
    1.28 -            localtime = self.info.get('localtime', 0)
    1.29 -            if localtime is not None and localtime == 1:
    1.30 +            localtime = self.info.get('localtime', False)
    1.31 +            if localtime:
    1.32                  xc.domain_set_time_offset(self.domid)
    1.33  
    1.34              xc.domain_setcpuweight(self.domid, self.info['cpu_weight'])
    1.35 @@ -1780,17 +1785,17 @@ class XendDomainInfo:
    1.36      def get_bios_boot(self):
    1.37          return '' # TODO
    1.38      def get_platform_std_vga(self):
    1.39 -        return self.info.get('platform_std_vga', 0)    
    1.40 +        return self.info.get('platform_std_vga', False)    
    1.41      def get_platform_keymap(self):
    1.42          return ''
    1.43      def get_platform_serial(self):
    1.44          return self.info.get('platform_serial', '')
    1.45      def get_platform_localtime(self):
    1.46 -        return self.info.get('platform_localtime', 0)
    1.47 +        return self.info.get('platform_localtime', False)
    1.48      def get_platform_clock_offset(self):
    1.49 -        return self.info.get('platform_clock_offset', 0)
    1.50 +        return self.info.get('platform_clock_offset', False)
    1.51      def get_platform_enable_audio(self):
    1.52 -        return self.info.get('platform_enable_audio', 0)
    1.53 +        return self.info.get('platform_enable_audio', False)
    1.54      def get_platform_keymap(self):
    1.55          return self.info.get('platform_keymap', '')
    1.56      def get_builder(self):