panic() could hang in the early boot process in case it was called before
the blue screen was initialized - blue_screen_enter() now returns wether or not it has been initialized already (there will only be serial output in that case). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22491 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
17dee6524b
commit
173d0b2fc7
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Copyright 2005-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
@ -486,7 +486,7 @@ blue_screen_init(void)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
status_t
|
||||
blue_screen_enter(bool debugOutput)
|
||||
{
|
||||
sScreen.attr = debugOutput ? 0xf0 : 0x0f;
|
||||
@ -494,12 +494,16 @@ blue_screen_enter(bool debugOutput)
|
||||
sScreen.x = sScreen.y = 0;
|
||||
sScreen.state = CONSOLE_STATE_NORMAL;
|
||||
|
||||
if (sModule == NULL)
|
||||
return B_NO_INIT;
|
||||
|
||||
sModule->get_size(&sScreen.columns, &sScreen.rows);
|
||||
#if !NO_CLEAR
|
||||
sModule->clear(sScreen.attr);
|
||||
#else
|
||||
sModule->fill_glyph(0, sScreen.y, sScreen.columns, 3, ' ', sScreen.attr);
|
||||
#endif
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Copyright 2005-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef BLUE_SCREEN_H
|
||||
@ -14,7 +14,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
status_t blue_screen_init(void);
|
||||
void blue_screen_enter(bool debugOutput);
|
||||
status_t blue_screen_enter(bool debugOutput);
|
||||
|
||||
char blue_screen_getchar(void);
|
||||
void blue_screen_putchar(char c);
|
||||
|
@ -893,8 +893,8 @@ kernel_debugger(const char *message)
|
||||
}
|
||||
|
||||
if (sBlueScreenOutput) {
|
||||
sBlueScreenEnabled = true;
|
||||
blue_screen_enter(false);
|
||||
if (blue_screen_enter(false) == B_OK)
|
||||
sBlueScreenEnabled = true;
|
||||
}
|
||||
|
||||
if (message)
|
||||
|
Loading…
Reference in New Issue
Block a user