[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH]blktap2: set corret file path for all drivers in chain.


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Åukasz OleÅ <lukaszoles@xxxxxxxxx>
  • Date: Tue, 17 Aug 2010 23:00:22 +0200
  • Delivery-date: Tue, 17 Aug 2010 14:01:37 -0700
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.