[XEND] Check for and fail on non-existent floppy-drive file when starting HVM guest.

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 <stefanb@us.ibm.com>
This commit is contained in:
kfraser@localhost.localdomain committed 2006-10-15 09:19:26 +01:00
1 parent c139b7ee78
commit a5d51aa564
1 file changed
+5
+5
View File
@@ -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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.