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] Only skip the image name if it is the image name

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [patch] Only skip the image name if it is the image name
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Tue, 28 Aug 2007 18:34:01 +0900
Cc: Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
Delivery-date: Tue, 28 Aug 2007 02:38:47 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
When kexecing the BOOT_IMAGE isn't provided on the second kernel's
command line and thus cmdline_parse() was just skipping over
the first parameter.

Observed on ia64

Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>

Index: xen-unstable.hg/xen/common/kernel.c
===================================================================
--- xen-unstable.hg.orig/xen/common/kernel.c    2007-08-28 18:24:54.000000000 
+0900
+++ xen-unstable.hg/xen/common/kernel.c 2007-08-28 18:25:01.000000000 +0900
@@ -37,8 +37,9 @@ void cmdline_parse(char *cmdline)
     /* Skip whitespace and the image name. */
     while ( *p == ' ' )
         p++;
-    if ( (p = strchr(p, ' ')) == NULL )
-        return;
+    if (! strncmp(p, "BOOT_IMAGE=", strlen("BOOT_IMAGE=")) )
+        if ( (p = strchr(p, ' ')) == NULL )
+            return;
 
     for ( ; ; )
     {

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel