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] ioemu: ignore the arg of tapdisk

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: [Xen-devel][PATCH] ioemu: ignore the arg of tapdisk
From: "Zhang, Yang" <yang.zhang@xxxxxxxxx>
Date: Tue, 9 Jun 2009 11:33:41 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Mon, 08 Jun 2009 20:37:09 -0700
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
Thread-index: AcnosxWisvORi9EPSzKCpJpLoB0Mbg==
Thread-topic: [Xen-devel][PATCH] ioemu: ignore the arg of tapdisk
The new blktap implemention changes arg of tap driver type from 'tap:qcow' to 
'tap:tapdisk:qcow'.
qemu need change the way to read these params.

Signed-off-by: Yang Zhang <yan.zhang@xxxxxxxxx>

diff --git a/xenstore.c b/xenstore.c
index d2f38d2..6dc613e 100644
--- a/xenstore.c
+++ b/xenstore.c
@@ -405,13 +405,16 @@ void xenstore_parse_domain_config(int hvm_domid)
             continue;
         /* Obtain blktap sub-type prefix */
         if (!strcmp(drv, "tap") && params[0]) {
-            char *offset = strchr(params, ':'); 
+            char *params_old = params;
+            if (!strncmp(params, "tapdisk:", 8))
+                params_old += 8;
+            char *offset = strchr(params_old, ':'); 
             if (!offset)
                 continue ;
            free(drv);
-           drv = malloc(offset - params + 1);
-           memcpy(drv, params, offset - params);
-           drv[offset - params] = '\0';
+           drv = malloc(offset - params_old + 1);
+           memcpy(drv, params_old, offset - params_old);
+           drv[offset - params_old] = '\0';
            if (!strcmp(drv, "aio"))
                /* qemu does aio anyway if it can */
                format = &bdrv_raw;
-- 
1.6.0.rc1

Best Regards
--yang

Attachment: 0001-ioemu-ignore-the-arg-of-tapdisk.patch
Description: 0001-ioemu-ignore-the-arg-of-tapdisk.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>