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

[Xen-devel] [PATCH] xl: fix tap:aio disk parsing



Fix "tap:aio" parsing in xl after 22921

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

diff -r c0a46434347b tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Wed Feb 16 18:23:48 2011 +0000
+++ b/tools/libxl/xl_cmdimpl.c  Wed Feb 16 19:49:14 2011 +0000
@@ -452,8 +452,6 @@ static int parse_disk_config(libxl_devic
     char *p, *end, *tok;
 
     memset(disk, 0, sizeof(*disk));
-    disk->format = DISK_FORMAT_RAW;
-    disk->backend = DISK_BACKEND_TAP;
 
     for(tok = p = buf2, end = buf2 + strlen(buf2) + 1; p < end; p++) {
         switch(state){
@@ -485,7 +483,11 @@ static int parse_disk_config(libxl_devic
             }
             break;
         case DSTATE_TAP:
-            if ( *p == ':' ) {
+            if (*p == ',') {
+                disk->format = DISK_FORMAT_RAW;
+                disk->backend = DISK_BACKEND_TAP;
+                state = DSTATE_PHYSPATH;
+            } else if ( *p == ':' ) {
                 *p = '\0';
                 if (!strcmp(tok, "aio")) {
                     tok = p + 1;
@@ -511,8 +513,10 @@ static int parse_disk_config(libxl_devic
 
                 tok = p + 1;
                 state = DSTATE_PHYSPATH;
-            }
-            break;
+                break;
+            } else {
+                break;
+            }
         case DSTATE_PHYSPATH:
             if ( *p == ',' ) {
                 int ioemu_len;

_______________________________________________
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®.