From: Ben Gras Date: Thu, 9 Feb 2012 17:49:24 +0000 (+0100) Subject: Fixes for loading kernel with multiboot X-Git-Tag: v3.2.0~65 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=636264c1c6b59dd33786893192a5bc48a067f5dc;p=minix.git Fixes for loading kernel with multiboot While parsing command line, only consider "variable=value" to be part of environment. Patch by Antoine Leca. --- diff --git a/kernel/arch/i386/pre_init.c b/kernel/arch/i386/pre_init.c index 9dbd07491..fe020b9f6 100644 --- a/kernel/arch/i386/pre_init.c +++ b/kernel/arch/i386/pre_init.c @@ -13,7 +13,6 @@ #include #include #include -#include "../../../boot/image.h" #include "string.h" #include "arch_proto.h" #include "libexec.h" @@ -147,6 +146,8 @@ PRIVATE void mb_print(char *str) while (*str) { if (*str == '\n') { str++; + while (print_col < MULTIBOOT_CONSOLE_COLS) + mb_put_char(' ', print_line, print_col++); print_line++; print_col = 0; continue; @@ -283,10 +284,10 @@ PRIVATE void get_parameters(multiboot_info_t *mbi) value_i = 0; while (*p == ' ') p++; if (!*p) break; - while (*p && *p != '=' && var_i < GRAN - 1) + while (*p && *p != '=' && *p != ' ' && var_i < GRAN - 1) var[var_i++] = *p++ ; var[var_i] = 0; - p++; /* skip '=' */ + if (*p++ != '=') continue; /* skip if not name=value */ while (*p && *p != ' ' && value_i < GRAN - 1) value[value_i++] = *p++ ; value[value_i] = 0;