Stefano Stabellini
2009-Dec-09 16:04 UTC
[Xen-devel] [PATCH] libxenlight: fix cd-insert cli arguments parsing
Hi all,
this patch fixes a bug in the command line arguments parsing code of
cd_insert.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
diff -r 9d22971d3f32 tools/libxl/xl.c
--- a/tools/libxl/xl.c Wed Dec 09 15:37:32 2009 +0000
+++ b/tools/libxl/xl.c Wed Dec 09 15:57:54 2009 +0000
@@ -904,10 +904,10 @@
disk.phystype = PHYSTYPE_FILE;
}
} else {
- p = ''\0'';
- disk.physpath = strdup(p);
+ *p = ''\0'';
p++;
- libxl_string_to_phystype(&ctx, p, &disk.phystype);
+ disk.physpath = p;
+ libxl_string_to_phystype(&ctx, phys, &disk.phystype);
}
} else {
disk.physpath = NULL;
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel