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

[Xen-changelog] [xen-unstable] xend: Fix keymap handling



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1216630027 -3600
# Node ID 34ad9e2c0d10a24b7e66eaaed9862843d9075cf7
# Parent  978ffdd19c0f0c8c7dbe6596bf78e6423de8f2e1
xend: Fix keymap handling

Patch allows keymap to be specified inside vfb description and
allows VM configured keymap setting to override XenD default

Signed-off-by: Pat Campbell <plc@xxxxxxxxxx>
---
 tools/python/xen/xend/image.py |    4 +++-
 tools/python/xen/xm/create.py  |    7 ++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff -r 978ffdd19c0f -r 34ad9e2c0d10 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Mon Jul 21 09:46:17 2008 +0100
+++ b/tools/python/xen/xend/image.py    Mon Jul 21 09:47:07 2008 +0100
@@ -265,9 +265,12 @@ class ImageHandler:
         has_vnc = int(vmConfig['platform'].get('vnc', 0)) != 0
         has_sdl = int(vmConfig['platform'].get('sdl', 0)) != 0
         opengl = 1
+        keymap = vmConfig['platform'].get("keymap")
         for dev_uuid in vmConfig['console_refs']:
             dev_type, dev_info = vmConfig['devices'][dev_uuid]
             if dev_type == 'vfb':
+                if 'keymap' in dev_info:
+                    keymap = dev_info.get('keymap',{})
                 vfb_type = dev_info.get('type', {})
                 if vfb_type == 'sdl':
                     self.display = dev_info.get('display', {})
@@ -279,7 +282,6 @@ class ImageHandler:
                     has_vnc = True
                 break
 
-        keymap = vmConfig['platform'].get("keymap")
         if keymap:
             ret.append("-k")
             ret.append(keymap)
diff -r 978ffdd19c0f -r 34ad9e2c0d10 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Mon Jul 21 09:46:17 2008 +0100
+++ b/tools/python/xen/xm/create.py     Mon Jul 21 09:47:07 2008 +0100
@@ -325,7 +325,7 @@ gopts.var('irq', val='IRQ',
          For example 'irq=7'.
          This option may be repeated to add more than one IRQ.""")
 
-gopts.var('vfb', 
val="type={vnc,sdl},vncunused=1,vncdisplay=N,vnclisten=ADDR,display=DISPLAY,xauthority=XAUTHORITY,vncpasswd=PASSWORD,opengl=1",
+gopts.var('vfb', 
val="type={vnc,sdl},vncunused=1,vncdisplay=N,vnclisten=ADDR,display=DISPLAY,xauthority=XAUTHORITY,vncpasswd=PASSWORD,opengl=1,keymap=FILE",
           fn=append_value, default=[],
           use="""Make the domain a framebuffer backend.
           The backend type should be either sdl or vnc.
@@ -336,7 +336,8 @@ gopts.var('vfb', val="type={vnc,sdl},vnc
           default password.
           For type=sdl, a viewer will be started automatically using the
           given DISPLAY and XAUTHORITY, which default to the current user's
-          ones.  OpenGL will be used by default unless opengl is set to 0.""")
+          ones.  OpenGL will be used by default unless opengl is set to 0.
+          keymap overrides the XendD configured default layout file.""")
 
 gopts.var('vif', 
val="type=TYPE,mac=MAC,bridge=BRIDGE,ip=IPADDR,script=SCRIPT," + \
           "backend=DOM,vifname=NAME,rate=RATE,model=MODEL,accel=ACCEL",
@@ -741,7 +742,7 @@ def configure_vfbs(config_devs, vals):
         for (k,v) in d.iteritems():
             if not k in [ 'vnclisten', 'vncunused', 'vncdisplay', 'display',
                           'videoram', 'xauthority', 'type', 'vncpasswd',
-                          'opengl' ]:
+                          'opengl', 'keymap' ]:
                 err("configuration option %s unknown to vfbs" % k)
             config.append([k,v])
         if not d.has_key("keymap"):

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.