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:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2005-2006, Axel Dörfler, [email protected]. All rights reserved.
|
* Copyright 2005-2007, Axel Dörfler, [email protected]. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -486,7 +486,7 @@ blue_screen_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
status_t
|
||||||
blue_screen_enter(bool debugOutput)
|
blue_screen_enter(bool debugOutput)
|
||||||
{
|
{
|
||||||
sScreen.attr = debugOutput ? 0xf0 : 0x0f;
|
sScreen.attr = debugOutput ? 0xf0 : 0x0f;
|
||||||
@@ -494,12 +494,16 @@ blue_screen_enter(bool debugOutput)
|
|||||||
sScreen.x = sScreen.y = 0;
|
sScreen.x = sScreen.y = 0;
|
||||||
sScreen.state = CONSOLE_STATE_NORMAL;
|
sScreen.state = CONSOLE_STATE_NORMAL;
|
||||||
|
|
||||||
|
if (sModule == NULL)
|
||||||
|
return B_NO_INIT;
|
||||||
|
|
||||||
sModule->get_size(&sScreen.columns, &sScreen.rows);
|
sModule->get_size(&sScreen.columns, &sScreen.rows);
|
||||||
#if !NO_CLEAR
|
#if !NO_CLEAR
|
||||||
sModule->clear(sScreen.attr);
|
sModule->clear(sScreen.attr);
|
||||||
#else
|
#else
|
||||||
sModule->fill_glyph(0, sScreen.y, sScreen.columns, 3, ' ', sScreen.attr);
|
sModule->fill_glyph(0, sScreen.y, sScreen.columns, 3, ' ', sScreen.attr);
|
||||||
#endif
|
#endif
|
||||||
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2005-2006, Axel Dörfler, [email protected]. All rights reserved.
|
* Copyright 2005-2007, Axel Dörfler, [email protected]. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef BLUE_SCREEN_H
|
#ifndef BLUE_SCREEN_H
|
||||||
@@ -14,7 +14,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
status_t blue_screen_init(void);
|
status_t blue_screen_init(void);
|
||||||
void blue_screen_enter(bool debugOutput);
|
status_t blue_screen_enter(bool debugOutput);
|
||||||
|
|
||||||
char blue_screen_getchar(void);
|
char blue_screen_getchar(void);
|
||||||
void blue_screen_putchar(char c);
|
void blue_screen_putchar(char c);
|
||||||
|
|||||||
@@ -893,8 +893,8 @@ kernel_debugger(const char *message)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sBlueScreenOutput) {
|
if (sBlueScreenOutput) {
|
||||||
sBlueScreenEnabled = true;
|
if (blue_screen_enter(false) == B_OK)
|
||||||
blue_screen_enter(false);
|
sBlueScreenEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (message)
|
if (message)
|
||||||
|
|||||||
Reference in New Issue
Block a user