|
|
|
|
|
|
|
|
|
|
xen-devel
RE: [Xen-devel][PATCH] ioemu: ignore the arg of tapdisk
hi Ian, If the patch is fine to you, can you help me to check in it. Or else
when use "tap:tapdisk:qcow2" which introduced by blktap2 at config file will
raise error in qemu.
Best Regards
--yang
-----Original Message-----
From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Zhang, Yang
Sent: 2009年6月9日 11:34
To: Ian Jackson
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx; Keir Fraser
Subject: [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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|