diff options
author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2011-02-25 18:41:34 +0000 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2011-02-25 18:41:34 +0000 |
commit | 832085e21c1c24a5cf3aa5607f0c147f66f89585 (patch) | |
tree | 1ed05083290a04107381aa3ffc3d1c36dca49ce1 | |
parent | c15cad7df60be4de55233fd32a7f60a15886d226 (diff) | |
download | xen-832085e21c1c24a5cf3aa5607f0c147f66f89585.tar.gz xen-832085e21c1c24a5cf3aa5607f0c147f66f89585.tar.bz2 xen-832085e21c1c24a5cf3aa5607f0c147f66f89585.zip |
xl: fix tap:aio disk parsing
Fix "tap:aio" parsing in xl after 22921
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
-rw-r--r-- | tools/libxl/xl_cmdimpl.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 0fad4711ce..fe136eeab6 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -451,8 +451,6 @@ static int parse_disk_config(libxl_device_disk *disk, char *buf2) 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 @@ static int parse_disk_config(libxl_device_disk *disk, char *buf2) } 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 @@ static int parse_disk_config(libxl_device_disk *disk, char *buf2) tok = p + 1; state = DSTATE_PHYSPATH; + break; + } else { + break; } - break; case DSTATE_PHYSPATH: if ( *p == ',' ) { int ioemu_len; |