From: Christoph Egger Subject: [PATCH] tools: fix inverted logic check Date: Thu, 25 Jun 2009 12:11:27 +0200 Message-ID: <200906251211.28198.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_Q10QKtHRFsigQv6" 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@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_Q10QKtHRFsigQv6 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! Attached patch fixes an inverted logic check. Also add a sanity check to device_model. With this, device_model = 'qemu_dm' now really works. Signed-off-by: Christoph Egger -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 --Boundary-00=_Q10QKtHRFsigQv6 Content-Type: text/x-diff; charset="us-ascii"; name="xen_python.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_python.diff" diff -r f3a909c8e8e6 tools/python/xen/xend/XendConfig.py --- a/tools/python/xen/xend/XendConfig.py Wed Jun 24 15:24:53 2009 +0100 +++ b/tools/python/xen/xend/XendConfig.py Thu Jun 25 12:07:30 2009 +0200 @@ -463,9 +463,11 @@ class XendConfig(dict): if 'device_model' not in self['platform']: self['platform']['device_model'] = auxbin.pathTo("qemu-dm") # device_model may be set to 'qemu-dm' or 'stubdom-dm' w/o a path - if os.path.dirname(self['platform']['device_model']) != "": + if os.path.dirname(self['platform']['device_model']) == "": self['platform']['device_model'] = \ auxbin.pathTo(self['platform']['device_model']) + if not os.path.exists(self['platform']['device_model']): + raise VmError("device model '%s' not found" % str(self['platform']['device_model'])) if self.is_hvm(): if 'timer_mode' not in self['platform']: --Boundary-00=_Q10QKtHRFsigQv6 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 --Boundary-00=_Q10QKtHRFsigQv6--