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] [PATCH 5 of 9] Check tapdisk paths from the last colon inste

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 5 of 9] Check tapdisk paths from the last colon instead of the first
From: Brendan Cully <brendan@xxxxxxxxx>
Date: Wed, 13 May 2009 17:19:33 -0700
Cc: andy@xxxxxxxxx
Delivery-date: Wed, 13 May 2009 17:22:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1242260368@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1242260368@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1f0f01bc86a5
# HG changeset patch
# User Brendan Cully
# Date 1242260367 25200
# Node ID 42fddb3a8edeb80339618b7f758dc2959cf97115
# Parent  99c01882edb65e702875afc76319e92b88966402
Check tapdisk paths from the last colon instead of the first.
This allows the Remus tapdisk proxy to configure itself using the form
tap:remus:host:port:aio:....

Signed-off-by: Brendan Cully <brendan@xxxxxxxxx>

diff --git a/tools/blktap/lib/xenbus.c b/tools/blktap/lib/xenbus.c
--- a/tools/blktap/lib/xenbus.c
+++ b/tools/blktap/lib/xenbus.c
@@ -256,7 +256,7 @@
                path += strlen("ioemu:");
        }
 
-       tmp = strchr(path, ':');
+       tmp = strrchr(path, ':');
        if (tmp != NULL)
                path = tmp + 1;
 
diff --git a/tools/python/xen/util/blkif.py b/tools/python/xen/util/blkif.py
--- a/tools/python/xen/util/blkif.py
+++ b/tools/python/xen/util/blkif.py
@@ -78,7 +78,8 @@
         if typ in ("phy", "drbd") and not fn.startswith("/"):
             fn = "/dev/%s" %(fn,)
         if typ == "tap":
-            (taptype, fn) = fn.split(":", 1)
+            flds = fn.split(':')
+            (taptype, fn) = flds[0], flds[-1]
     return (fn, taptype)
 
 def blkdev_uname_to_file(uname):

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