diff options
author | Roland McGrath <roland@gnu.org> | 2001-09-30 21:45:27 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2001-09-30 21:45:27 +0000 |
commit | 59a9f2a25df30ae0e45e01414b643dee07c03301 (patch) | |
tree | 468afe7f414d5f4f211a47dcbeb5ca248a27f89c /kern | |
parent | e36bec7b9d7cf4c4dda05af718a9110222bf5a6f (diff) |
2001-09-30 Roland McGrath <roland@frob.com>
* kern/bootstrap.c (bootstrap_create): Ignore trailing spaces when
checking boot module string for containing none.
Diffstat (limited to 'kern')
-rw-r--r-- | kern/bootstrap.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/kern/bootstrap.c b/kern/bootstrap.c index a504115..2d9e456 100644 --- a/kern/bootstrap.c +++ b/kern/bootstrap.c @@ -99,13 +99,28 @@ void bootstrap_create() { struct multiboot_module *bmods = ((struct multiboot_module *) phystokv(boot_info.mods_addr)); + char *p; if (!(boot_info.flags & MULTIBOOT_MODS) || (boot_info.mods_count == 0)) panic ("No bootstrap code loaded with the kernel!"); - if (boot_info.mods_count == 1 - && strchr((char*)phystokv(bmods[0].string), ' ') == 0) + if (boot_info.mods_count == 1) + { + p = strchr((char*)phystokv(bmods[0].string), ' '); + if (p != 0) + { + do + ++p; + while (*p == ' '); + if (*p == '\0') + p = 0; + } + } + else + p = 0; + + if (p == 0) { printf("Loading single multiboot module in compat mode: %s\n", (char*)phystokv(bmods[0].string)); |