mirror of
https://github.com/limine-bootloader/limine
synced 2025-01-07 13:22:18 +03:00
Add timeout config option
This commit is contained in:
parent
a234da8deb
commit
44a5f47516
@ -57,7 +57,7 @@ void main(int boot_drive) {
|
||||
}
|
||||
}
|
||||
|
||||
int drive, part;
|
||||
int drive, part, timeout;
|
||||
char path[128], cmdline[128], proto[64];
|
||||
|
||||
if (config_loaded) {
|
||||
@ -68,6 +68,11 @@ void main(int boot_drive) {
|
||||
} else {
|
||||
drive = (int)strtoui(buf);
|
||||
}
|
||||
if (!config_get_value(buf, 64, (void*)0x100000, "TIMEOUT")) {
|
||||
timeout = 5;
|
||||
} else {
|
||||
timeout = (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");
|
||||
@ -79,7 +84,7 @@ void main(int boot_drive) {
|
||||
}
|
||||
|
||||
print("\n");
|
||||
for (int i = 3; i; i--) {
|
||||
for (int i = timeout; i; i--) {
|
||||
print("\rBooting in %d (press any key to edit command line)...", i);
|
||||
if (pit_sleep_and_quit_on_keypress(18)) {
|
||||
print("\n\n> ");
|
||||
|
@ -2,3 +2,4 @@ KERNEL_PARTITION=0
|
||||
KERNEL_PATH=test.elf
|
||||
KERNEL_PROTO=stivale
|
||||
KERNEL_CMDLINE=none
|
||||
TIMEOUT=0
|
||||
|
Loading…
Reference in New Issue
Block a user