All of lore.kernel.org
 help / color / mirror / Atom feed
* x86: fix to parse multiboot command line passed by latest grub
@ 2009-12-07  8:23 Wei Yongjun
  2009-12-07  8:26 ` [PATCH] " Wei Yongjun
  2009-12-07  9:57 ` Keir Fraser
  0 siblings, 2 replies; 10+ messages in thread
From: Wei Yongjun @ 2009-12-07  8:23 UTC (permalink / raw)
  To: Keir Fraser, xen-devel

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@cn.fujitsu.com>

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 == ' ' )

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-12-08  7:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-07  8:23 x86: fix to parse multiboot command line passed by latest grub Wei Yongjun
2009-12-07  8:26 ` [PATCH] " Wei Yongjun
2009-12-07  9:19   ` Ian Campbell
2009-12-07  9:47     ` Wei Yongjun
2009-12-07  9:48     ` [PATCHv2] " Wei Yongjun
2009-12-07  9:57 ` Keir Fraser
2009-12-07 10:54   ` Samuel Thibault
2009-12-07 22:00     ` Simon Horman
2009-12-07 22:46       ` Samuel Thibault
2009-12-08  7:39       ` Keir Fraser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.