WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] libxenlight: fix cd-insert cli arguments parsing

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] libxenlight: fix cd-insert cli arguments parsing
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Wed, 9 Dec 2009 16:04:41 +0000
Delivery-date: Wed, 09 Dec 2009 08:00:53 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
Hi all,
this patch fixes a bug in the command line arguments parsing code of
cd_insert.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

---

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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] libxenlight: fix cd-insert cli arguments parsing, Stefano Stabellini <=