Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [BLKTAP][XEND] Fix blktap to work with a

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [BLKTAP][XEND] Fix blktap to work with a bootloader
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 28 Sep 2006 21:40:14 +0000
Delivery-date: Thu, 28 Sep 2006 17:39:10 -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 Andrew Warfield <andy@xxxxxxxxxxxxx>
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [BLKTAP][XEND] Fix blktap to work with a bootloader, Xen patchbot-unstable <=