From: Stefan Berger Subject: [PATCH] [BUGFIX] Fix for 'Device model hangs with non-existent floopy files' Date: Fri, 13 Oct 2006 10:13:02 -0400 Message-ID: <1160748783.20776.5.camel@lt2.watson.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-09Wk/7CQyiXhFS2f5tGB" 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 --=-09Wk/7CQyiXhFS2f5tGB Content-Type: text/plain Content-Transfer-Encoding: 7bit The qemu device model hangs when a non-existent floppy file is passed via 'fda' or 'fdb'. The attached patch checks whether the floppy file exists and raises an error if it does not. Signed-off-by: Stefan Berger --=-09Wk/7CQyiXhFS2f5tGB Content-Disposition: attachment; filename=xend-check-floppy-files.diff Content-Type: text/x-patch; name=xend-check-floppy-files.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Index: root/xen-unstable.hg/tools/python/xen/xend/image.py =================================================================== --- root.orig/xen-unstable.hg/tools/python/xen/xend/image.py +++ root/xen-unstable.hg/tools/python/xen/xend/image.py @@ -312,6 +312,11 @@ class HVMImageHandler(ImageHandler): if v: ret.append("-%s" % a) ret.append("%s" % v) + + if a in ['fda', 'fdb' ]: + if v: + if not os.path.isfile(v): + raise VmError("Floppy file %s does not exist." % v) log.debug("args: %s, val: %s" % (a,v)) # Handle disk/network related options --=-09Wk/7CQyiXhFS2f5tGB 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 --=-09Wk/7CQyiXhFS2f5tGB--