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] [PATCHv2] x86: fix to parse multiboot command line passed by

To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Subject: [Xen-devel] [PATCHv2] x86: fix to parse multiboot command line passed by latest grub
From: Wei Yongjun <yjwei@xxxxxxxxxxxxxx>
Date: Mon, 07 Dec 2009 17:48:23 +0800
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>
Delivery-date: Mon, 07 Dec 2009 01:50:06 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1260177590.23698.28229.camel@xxxxxxxxxxxxxxxxxxxxxx>
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>
References: <4B1CBB98.3050408@xxxxxxxxxxxxxx> <4B1CBC46.6040004@xxxxxxxxxxxxxx> <1260177590.23698.28229.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.23 (X11/20090817)
latest grub had changed to "don't pass filename in multiboot
command line".

The old cmdline format is: "module-name options..."
The new cmdline format is: "options..."

So xen + grub2 always loss the first option, because xen will
skip the first option.

Since xen doesn't actually complain about unknown options, so
simply stop stripping the first option altogether, under grub1
Xen will just ignore it and under grub2 it won't be passed in.

Signed-off-by: Wei Yongjun <yjwei@xxxxxxxxxxxxxx>

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -423,10 +423,6 @@
     p = p ? : "";
     while ( *p == ' ' )
         p++;
-    while ( (*p != ' ') && (*p != '\0') )
-        p++;
-    while ( *p == ' ' )
-        p++;
     return p;
 }
 


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