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

[Xen-changelog] [xen-unstable] xl: fix tap:aio disk parsing



# HG changeset patch
# User Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
# Date 1298659294 0
# Node ID 3060ba3983ceb874df8d637dcda21a72f242f2c1
# Parent  846c53ec8b58899cc84b57799407d5b174f795f4
xl: fix tap:aio disk parsing

Fix "tap:aio" parsing in xl after 22921

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r 846c53ec8b58 -r 3060ba3983ce tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Fri Feb 25 17:26:18 2011 +0000
+++ b/tools/libxl/xl_cmdimpl.c  Fri Feb 25 18:41:34 2011 +0000
@@ -451,8 +451,6 @@
     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){
@@ -484,7 +482,11 @@
             }
             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;
@@ -510,8 +512,10 @@
 
                 tok = p + 1;
                 state = DSTATE_PHYSPATH;
+                break;
+            } else {
+                break;
             }
-            break;
         case DSTATE_PHYSPATH:
             if ( *p == ',' ) {
                 int ioemu_len;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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