ia64/xen-unstable

changeset 11670:3b7e11cbeb94

[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@redhat.com>
author Andrew Warfield <andy@xensource.com>
date Thu Sep 28 12:12:59 2006 -0700 (2006-09-28)
parents 5f5e3b4c6fba
children 500043f8ccff
files tools/python/xen/util/blkif.py
line diff
     1.1 --- a/tools/python/xen/util/blkif.py	Thu Sep 28 12:03:01 2006 -0700
     1.2 +++ b/tools/python/xen/util/blkif.py	Thu Sep 28 12:12:59 2006 -0700
     1.3 @@ -67,6 +67,8 @@ def blkdev_uname_to_file(uname):
     1.4          (typ, fn) = uname.split(":")
     1.5          if typ == "phy" and not fn.startswith("/"):
     1.6              fn = "/dev/%s" %(fn,)
     1.7 +        if typ == "tap":
     1.8 +            (typ, fn) = fn.split(":", 1)
     1.9      return fn
    1.10  
    1.11  def mount_mode(name):