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-devel

[Xen-devel] Re: [Patch] Fix blktap to work with a bootloader

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [Patch] Fix blktap to work with a bootloader
From: "Stephen C. Tweedie" <sct@xxxxxxxxxx>
Date: Tue, 10 Oct 2006 15:56:02 +0100
Cc: Andrew Warfield <andrew.warfield@xxxxxxxxxxxx>, Julian Chesterfield <jac90@xxxxxxxxx>
Delivery-date: Tue, 10 Oct 2006 07:57:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1159465004.8884.23.camel@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1159465004.8884.23.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi all,

On Thu, 2006-09-28 at 18:36 +0100, Stephen C. Tweedie wrote:

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

Whoops, xen is still broken ---

> Signed-off-by: Stephen Tweedie <sct@xxxxxxxxxx>
> --- a/tools/python/xen/util/blkif.py  Thu Sep 28 17:09:09 2006 +0100
> +++ b/tools/python/xen/util/blkif.py  Thu Sep 28 18:05:08 2006 +0100
> @@ -64,9 +64,11 @@ def blkdev_uname_to_file(uname):
>      if uname.find(":") != -1:
> -        (typ, fn) = uname.split(":")
> +        (typ, fn) = uname.split(":", 1)
>          if typ == "phy" and not fn.startswith("/"):
>              fn = "/dev/%s" %(fn,)
> +        if typ == "tap":
> +            (typ, fn) = fn.split(":", 1)
>      return fn

was what I posted, but only the second two new lines actually got
committed to the xenbits repository.

Without the first split(":", 1) change, we'll split at _all_ the ":"s in
the uname, and if there are more than one, then the assignment to the
(typ,fn) 2-tuple will fail.

Can this please be fixed properly?  It's just a 3-character commit
that's left. :-)

btw, is the process of merging patches from email being done completely
manually?  git certainly has really good pull-from-email scripts that
avoid this sort of oversight, but I'm not sure hg is quite so well
equipped.

Cheers,
 Stephen



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