ia64/xen-unstable

changeset 19567:cd92432a7af4

xend: Do not overwrite xauthority and display with empty values

Display and xauthority vars are read from vmConfig['platform'] first,
then they are read again from dev_info.
However if the user does not set those variable in the config file,
dev_info won't contain them, hence we are going to overwrite the
current significant values with null.
This patch fixes the problem setting display and xauthority to the
current values if dev_info does not contain them.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Apr 23 10:09:16 2009 +0100 (2009-04-23)
parents c7d2f046aa29
children 4dd8ed253ee0
files tools/python/xen/xend/image.py
line diff
     1.1 --- a/tools/python/xen/xend/image.py	Thu Apr 23 10:08:04 2009 +0100
     1.2 +++ b/tools/python/xen/xend/image.py	Thu Apr 23 10:09:16 2009 +0100
     1.3 @@ -291,8 +291,8 @@ class ImageHandler:
     1.4                  if int(dev_info.get('sdl', 0)) != 0 :
     1.5                      has_sdl = True
     1.6                  if has_sdl:
     1.7 -                    self.display = dev_info.get('display', {})
     1.8 -                    self.xauthority = dev_info.get('xauthority', {})
     1.9 +                    self.display = dev_info.get('display', self.display)
    1.10 +                    self.xauthority = dev_info.get('xauthority', self.xauthority)
    1.11                      opengl = int(dev_info.get('opengl', opengl))
    1.12                  if has_vnc:
    1.13                      vnc_config = dev_info.get('other_config', {})