Fix some weirdness

This commit is contained in:
Kevin Lange 2013-12-01 20:07:31 -08:00
parent 56ad9598d0
commit a376ab2563
3 changed files with 17 additions and 13 deletions

View File

@ -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);
}

View File

@ -1,4 +1,5 @@
#include <system.h>
#include <logging.h>
#include <tokenize.h>
int tokenize(char * str, char * sep, char **buf) {

View File

@ -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