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

Re: [Xen-devel] [PATCH] tools/hotplug/Linux/blktap: remove optional tapd

To: Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] tools/hotplug/Linux/blktap: remove optional tapdisk: prefix
From: Jim Fehlig <jfehlig@xxxxxxxxxx>
Date: Fri, 16 Apr 2010 14:51:22 -0600
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 18 Apr 2010 11:05:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4BC8547A020000780003A98D@xxxxxxxxxxxxxxxxxx>
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: <4BC8547A020000780003A98D@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.18 (X11/20081112)
Jan Beulich wrote:
> Perhaps this should even be further generalized (e.g. to remove any
> "[!/]*:" pattern prefixes) to be more forward compatible?
>   

Right.  Need to handle the 'ioemu' subtype as well.  How about just
stripping of everything before the leading '/'?  E.g. like the attached
patch?

Regards,
Jim

diff -r c02cc832cb2d tools/hotplug/Linux/blktap
--- a/tools/hotplug/Linux/blktap        Tue Apr 13 18:19:33 2010 +0100
+++ b/tools/hotplug/Linux/blktap        Fri Apr 16 14:48:00 2010 -0600
@@ -59,10 +59,10 @@
 if [ -n "$t" ]
 then
     p=$(xenstore_read "$XENBUS_PATH/params")
-    # if we have a ':', chew from head including :
+    # if we have a ':', remove everything up to leading '/'
     if echo $p | grep -q \:
     then
-        p=${p#*:}
+        p="/${p#*/}"
     fi
 fi
 # some versions of readlink cannot be passed a regular file
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel