From a376ab25638850421a5f0faaa4603b02980aca90 Mon Sep 17 00:00:00 2001 From: Kevin Lange Date: Sun, 1 Dec 2013 20:07:31 -0800 Subject: [PATCH] Fix some weirdness --- kernel/misc/device_init.c | 25 +++++++++++++------------ kernel/misc/tokenize.c | 1 + util/config-parser | 4 +++- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/kernel/misc/device_init.c b/kernel/misc/device_init.c index 3c786f06..6fcf72cb 100644 --- a/kernel/misc/device_init.c +++ b/kernel/misc/device_init.c @@ -10,6 +10,19 @@ int read_partition_map(int device); void legacy_parse_args(void) { char * c; + + if ((c = args_value("logtoserial"))) { + kprint_to_serial = 1; + debug_level = atoi(c); + debug_print(NOTICE, "Kernel serial logging enabled at level %d.", debug_level); + } + + if ((c = args_value("kernel-term"))) { + kprint_to_screen = 1; + debug_level = atoi(c); + debug_print(NOTICE, "Kernel screen logging enabled at level %d.", debug_level); + } + if ((c = args_value("vid"))) { debug_print(NOTICE, "Video mode requested: %s", c); @@ -69,18 +82,6 @@ void legacy_parse_args(void) { } } - if ((c = args_value("logtoserial"))) { - kprint_to_serial = 1; - debug_level = atoi(c); - debug_print(NOTICE, "Kernel serial logging enabled at level %d.", debug_level); - } - - if ((c = args_value("kernel-term"))) { - kprint_to_screen = 1; - debug_level = atoi(c); - debug_print(NOTICE, "Kernel screen logging enabled at level %d.", debug_level); - } - if (args_present("read-mbr")) { read_partition_map(0); } diff --git a/kernel/misc/tokenize.c b/kernel/misc/tokenize.c index 6666c427..6a0f206f 100644 --- a/kernel/misc/tokenize.c +++ b/kernel/misc/tokenize.c @@ -1,4 +1,5 @@ #include +#include #include int tokenize(char * str, char * sep, char **buf) { diff --git a/util/config-parser b/util/config-parser index bb99120d..2866dffe 100755 --- a/util/config-parser +++ b/util/config-parser @@ -33,8 +33,10 @@ if [ $ENABLE_SERIAL ]; then SERIAL="-serial stdio" fi +# This is actually a qemu "quirk" of sorts, double comma inserts an actual comma, +# but a single comma separates MODULE arguments, so watch out! RESPARSED=`echo $RESOLUTION | sed 's/x/,,/'` -GRAPHICS="vid=qemu=$RESPARSED" +GRAPHICS="vid=qemu,,$RESPARSED" if [ $ENABLE_GRAPHICS == false ]; then GRAPHICS="vgaterm" fi