Add KERNEL_DRIVE default value

This commit is contained in:
mintsuki 2020-03-27 03:45:36 +01:00
parent 1cbd6fb2e9
commit 573b3308e1
2 changed files with 6 additions and 3 deletions

View File

@ -62,8 +62,12 @@ void main(int boot_drive) {
if (config_loaded) {
char buf[32];
config_get_value(buf, 32, (void*)0x100000, "KERNEL_DRIVE");
drive = (int)strtoui(buf);
if (!config_get_value(buf, 32, (void*)0x100000, "KERNEL_DRIVE")) {
print("KERNEL_DRIVE not specified, using boot drive (%x)", boot_drive);
drive = boot_drive;
} else {
drive = (int)strtoui(buf);
}
config_get_value(buf, 32, (void*)0x100000, "KERNEL_PARTITION");
part = (int)strtoui(buf);
config_get_value(path, 128, (void*)0x100000, "KERNEL_PATH");

View File

@ -1,4 +1,3 @@
KERNEL_DRIVE=128
KERNEL_PARTITION=0
KERNEL_PATH=test.elf
KERNEL_PROTO=stivale