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

To: Wei Yongjun <yjwei@xxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: x86: fix to parse multiboot command line passed by latest grub
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Mon, 07 Dec 2009 09:57:41 +0000
Cc:
Delivery-date: Mon, 07 Dec 2009 01:58:25 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4B1CBB98.3050408@xxxxxxxxxxxxxx>
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
Thread-index: Acp3FsZzTBtwsNg1RF2POTks0VB0aAADPB4Q
Thread-topic: x86: fix to parse multiboot command line passed by latest grub
User-agent: Microsoft-Entourage/12.23.0.091001
I recommend just sticking a dummy first arg when writing a command line for
grub2, and living with it. Or get grub2 guys to give us a flag to detect
this stupid compatibility breakage. I don't really want hacks like this.

 -- Keir

On 07/12/2009 08:23, "Wei Yongjun" <yjwei@xxxxxxxxxxxxxx> wrote:

> 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.
> 
> Usually, the module-name is not start with char [a-zA-Z], such
> as /boot/vmlinuz, (hd0,1)/boot/vmlinuz, so this patch added
> isalpha() test of the first char of module-name/option to
> function cmdline_cook(), try to handle both the old and new
> cmdline format.
> 
> 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,6 +423,8 @@
>      p = p ? : "";
>      while ( *p == ' ' )
>          p++;
> +    if (isalpha(*p))
> +        return p;
>      while ( (*p != ' ') && (*p != '\0') )
>          p++;
>      while ( *p == ' ' )
> 
> 



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