debuggers.hg

changeset 20656:b2ccd48f2f9b

libxenlight: fix cd-insert cli arguments parsing

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Dec 11 08:47:51 2009 +0000 (2009-12-11)
parents 8fbc74d40739
children 1396dfb8d6ba
files tools/libxl/xl.c
line diff
     1.1 --- a/tools/libxl/xl.c	Fri Dec 11 08:46:02 2009 +0000
     1.2 +++ b/tools/libxl/xl.c	Fri Dec 11 08:47:51 2009 +0000
     1.3 @@ -904,10 +904,10 @@ void cd_insert(char *dom, char *virtdev,
     1.4                  disk.phystype = PHYSTYPE_FILE;
     1.5              }
     1.6          } else {
     1.7 -            p = '\0';
     1.8 -            disk.physpath = strdup(p);
     1.9 +            *p = '\0';
    1.10              p++;
    1.11 -            libxl_string_to_phystype(&ctx, p, &disk.phystype);
    1.12 +            disk.physpath = p;
    1.13 +            libxl_string_to_phystype(&ctx, phys, &disk.phystype);
    1.14          }
    1.15      } else {
    1.16              disk.physpath = NULL;