[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.0.3-testing] [BLKTAP][XEND] Fix blktap to work with a bootloader



# HG changeset patch
# User Andrew Warfield <andy@xxxxxxxxxxxxx>
# Date 1159470779 25200
# Node ID 3b7e11cbeb94066bd6c6c445ce019b8bee875adc
# Parent  5f5e3b4c6fba7c56df9bc7c29236ba2ae9a9d2a1
[BLKTAP][XEND] Fix blktap to work with a bootloader
If a Xen guest has a bootloader configured, then it will fail to start
on a blktap image.  The problem is blkdev_uname_to_file, which cannot
parse the "tap:aio:$filename" image strings: it tries to split the
string apart at ":" and assign the result to a 2-tuple, and this
results in a python error if the split results in three or more
strings.

The fix is to split only at the first ":", and then to split again
if we detect "tap:" as the image type.

Signed-off-by: Stephen Tweedie <sct@xxxxxxxxxx>
---
 tools/python/xen/util/blkif.py |    2 ++
 1 files changed, 2 insertions(+)

diff -r 5f5e3b4c6fba -r 3b7e11cbeb94 tools/python/xen/util/blkif.py
--- a/tools/python/xen/util/blkif.py    Thu Sep 28 12:03:01 2006 -0700
+++ b/tools/python/xen/util/blkif.py    Thu Sep 28 12:12:59 2006 -0700
@@ -67,6 +67,8 @@ def blkdev_uname_to_file(uname):
         (typ, fn) = uname.split(":")
         if typ == "phy" and not fn.startswith("/"):
             fn = "/dev/%s" %(fn,)
+        if typ == "tap":
+            (typ, fn) = fn.split(":", 1)
     return fn
 
 def mount_mode(name):

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.