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]blktap2: set corret file path for all drivers in chai

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH]blktap2: set corret file path for all drivers in chain.
From: Łukasz Oleś <lukaszoles@xxxxxxxxx>
Date: Tue, 17 Aug 2010 23:00:22 +0200
Delivery-date: Tue, 17 Aug 2010 14:01:37 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:mime-version:content-type:content-transfer-encoding :message-id; bh=97xfIjd4WgmfF6AIl6XABqeYJ4S7zc2lnBvLcfEQFVs=; b=AASjPJPBGpZVdECJ2qVp1jr9RctXgMizhkTFx1B66HR7E1hQ+lPPybhR2Z/7InPqgF 5XwOvttfO6AhJk1dzCWIhialcV3+Vu7R9ShLPqoGtd1nvRvMsXtGMxDW3JYPrOp0TLfQ 1P3cXRtvy+rwhSnma4plySKsQcRzOnlPDTc+Q=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:mime-version:content-type :content-transfer-encoding:message-id; b=nDj2oTr3jg5sluhIHhOy6GgMAHJHHAi6e47S187lXVupb3IueSGzNfmfw7Q2tOdAhJ a9RGhsRhdYk9dYmU6WtXmd1uw4wED3gxpaRhyO70QUoO9mKj7M+iSHuHpbgaYJFLiZQM RW1acaUffVHBPxjSUsDLGso5BKLWOsB2LM8CQ=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.13.3 (Linux/2.6.32-5-686; KDE/4.4.4; i686; ; )
In this example: tap-ctl create -a "log:|aio:/mnt/images/debian.img"
driver 'log' gets empty string as a file path and can't create correct unix 
socket in /var/run/tap.

Now every driver gets correct file path.

Signed-off-by: Lukasz Oles <lukaszoles@xxxxxxxxx>

diff -r 65db3394ef79 -r 76350d7af7d5 tools/blktap2/drivers/tapdisk-disktype.c
--- a/tools/blktap2/drivers/tapdisk-disktype.c  Tue Aug 17 21:19:05 2010 +0000
+++ b/tools/blktap2/drivers/tapdisk-disktype.c  Tue Aug 17 22:50:18 2010 +0000
@@ -184,7 +184,13 @@
        type = tapdisk_disktype_find(name);

        if (type >= 0)
-               *_path = params + len + 1;
+       {
+               *_path = strrchr(params + len + 2, ':');
+               if (*_path)
+                       *_path = *_path + 1;
+               else
+                       *_path = params + len + 1;
+       }

        return type;
 }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH]blktap2: set corret file path for all drivers in chain., Łukasz Oleś <=