WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [XEND] Check for and fail on non-existent

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEND] Check for and fail on non-existent floppy-drive file when starting HVM guest.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 15 Oct 2006 11:30:13 +0000
Delivery-date: Sun, 15 Oct 2006 04:30:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID e321f036f6032af7128b59904a7cc3ae723b8d58
# Parent  edcd3a25a2bdae510d91edc7f1bfdb54f429c762
[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@xxxxxxxxxx>
---
 tools/python/xen/xend/image.py |    5 +++++
 1 files changed, 5 insertions(+)

diff -r edcd3a25a2bd -r e321f036f603 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Sun Oct 15 09:15:51 2006 +0100
+++ b/tools/python/xen/xend/image.py    Sun Oct 15 09:19:26 2006 +0100
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEND] Check for and fail on non-existent floppy-drive file when starting HVM guest., Xen patchbot-unstable <=