From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Fehlig Subject: [PATCH] Add keymap to vfb config for existing hvm guests Date: Mon, 07 Dec 2009 17:01:29 -0700 Message-ID: <4B1D9759.90502@novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000903050703070904030006" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------000903050703070904030006 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I submitted a patch a while back [1] to add keymap to vfb config for hvm guests. This patch works fine for new config (xm create|new) but not existing, managed guests. To cover the latter case I introduced a validator method in XendConfig - patch attached. Regards, Jim [1] http://lists.xensource.com/archives/html/xen-devel/2009-10/msg01228.html Signed-off-by: Jim Fehlig --------------000903050703070904030006 Content-Type: text/x-patch; name="xend-vfb-sanity-check.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xend-vfb-sanity-check.patch" diff -r 0fb962a5dad3 tools/python/xen/xend/XendConfig.py --- a/tools/python/xen/xend/XendConfig.py Mon Dec 07 14:10:27 2009 +0000 +++ b/tools/python/xen/xend/XendConfig.py Mon Dec 07 16:49:54 2009 -0700 @@ -518,6 +518,14 @@ self['platform'].get('enable_audio'): self['platform']['soundhw'] = 'sb16' + def _vfb_sanity_check(self): + if 'keymap' in self['platform']: + for con in self['console_refs']: + if self['devices'][con][0] == 'vfb': + if 'keymap' not in self['devices'][con][1]: + self['devices'][con][1]['keymap'] = \ + self['platform']['keymap'] + def validate(self): self._uuid_sanity_check() self._name_sanity_check() @@ -525,6 +533,7 @@ self._actions_sanity_check() self._vcpus_sanity_check() self._platform_sanity_check() + self._vfb_sanity_check() def _dominfo_to_xapi(self, dominfo, update_mem = False): self['domid'] = dominfo['domid'] --------------000903050703070904030006 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------000903050703070904030006--