From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Yongjun Subject: [PATCHv2] x86: fix to parse multiboot command line passed by latest grub Date: Mon, 07 Dec 2009 17:48:23 +0800 Message-ID: <4B1CCF67.7010800@cn.fujitsu.com> References: <4B1CBB98.3050408@cn.fujitsu.com> <4B1CBC46.6040004@cn.fujitsu.com> <1260177590.23698.28229.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1260177590.23698.28229.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: "xen-devel@lists.xensource.com" , Keir Fraser List-Id: xen-devel@lists.xenproject.org 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 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; }