xl: fix tap:aio disk parsing
PATCH 1/1 xl: fix tap:aio disk parsing
Fix "tap:aio" parsing in xl after 22921
Signed-off-by Stefano Stabellini <[email protected]>
tools/libxl/xl_cmdimpl.c +9 -5
@@ -452,8 +452,6 @@ static int parse_disk_config(libxl_devicchar *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;
Ian Jackson
AppliedStefano 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.