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

[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

 


Rackspace

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