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

[Xen-changelog] [xen-unstable] libxenlight: fix cd-insert cli arguments parsing



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1260521271 0
# Node ID b2ccd48f2f9bb3747659d85f7c15a0f4fe7d787a
# Parent  8fbc74d40739febc9e8c8df8b76d9c753f7fe049
libxenlight: fix cd-insert cli arguments parsing

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 tools/libxl/xl.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r 8fbc74d40739 -r b2ccd48f2f9b tools/libxl/xl.c
--- a/tools/libxl/xl.c  Fri Dec 11 08:46:02 2009 +0000
+++ b/tools/libxl/xl.c  Fri Dec 11 08:47:51 2009 +0000
@@ -904,10 +904,10 @@ void cd_insert(char *dom, char *virtdev,
                 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-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®.