Skip to contentSkip to conversation

xl: fix tap:aio disk parsing

PATCH Applied Stefano Stabellini 2 participants 2 messages Feb 16, 2011 – Feb 25, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xl: fix tap:aio disk parsing

Fix "tap:aio" parsing in xl after 22921

tools/libxl/xl_cmdimpl.c +9 -5
diff -r c0a46434347b tools/libxl/xl_cmdimpl.c
@@ -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;
Applied
#1 lore raw

Stefano Stabellini writes ("[Xen-devel] [PATCH] xl: fix tap:aio disk parsing"):

Quoted 1 line

Fix "tap:aio" parsing in xl after 22921

Applied, thanks.

Ian.