Skip to contentSkip to conversation

Fix for 'Device model hangs with non-existent floopy files'

PATCH New Stefan Berger 1 participant 1 message Oct 13, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix for 'Device model hangs with non-existent floopy files'

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.

xen-unstable.hg/tools/python/xen/xend/image.py +5 -0
Index: 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

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel