[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86: fix to parse multiboot command line passed by latest grub




Ian Campbell wrote:
> On Mon, 2009-12-07 at 08:26 +0000, Wei Yongjun 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 modulename/option to
>> function cmdline_cook(), try to handle both the old and new
>> cmdline format.
>>     
>
> Xen doesn't actually complain about unknown options, does it? So why not
> simply stop stripping the first option altogether? Under grub1 Xen will
> just ignore it and under grub2 it won't be passed in.
>   

That it is OK. But the module-name will pass to the dom0, the cmdline of
dom0 like this
under grub1:

# cat /proc/cmdline
/boot/vmlinuz-2.6.31.6-xen
root=UUID=575f3be9-0a50-4d62-a36d-800e85a7aa70 ro console=tty0

Other way, I will send a patch as your advice^_^.

Thanks


> Ian.
>
>   
>> 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
>>     
>
>
>
>
>   

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.