Now checks for boot options; if you press space, it will enter the boot menu

(when there is one), if you press escape, it will boot in console mode.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8052 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2004-06-18 15:32:49 +00:00
parent c89be553a6
commit 5b82deb912
+18 -4
View File
@@ -8,8 +8,9 @@
#include "cpu.h" #include "cpu.h"
#include "mmu.h" #include "mmu.h"
#include "video.h" #include "video.h"
#include "keyboard.h"
#include <SupportDefs.h> #include <KernelExport.h>
#include <boot/platform.h> #include <boot/platform.h>
#include <boot/heap.h> #include <boot/heap.h>
#include <boot/stage2.h> #include <boot/stage2.h>
@@ -29,6 +30,9 @@ extern int main(stage2_args *args);
void _start(void); void _start(void);
uint32 sBootOptions;
static void static void
clear_bss(void) clear_bss(void)
{ {
@@ -47,10 +51,14 @@ call_ctors(void)
} }
bool uint32
platform_user_menu_requested(void) platform_boot_options(void)
{ {
return false; #if 0
if (!gKernelArgs.fb.enabled)
sBootOptions |= check_for_boot_keys();
#endif
return sBootOptions;
} }
@@ -100,6 +108,12 @@ _start(void)
mmu_init(); mmu_init();
video_init(); video_init();
spin(50000);
// wait a bit to give the user the opportunity to press a key
// reading the keyboard doesn't seem to work in graphics mode (maybe a bochs problem)
sBootOptions = check_for_boot_keys();
main(&args); main(&args);
} }