From f937627dc8054286f8b9fd7508e45a44ca950f9f Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 9 Jul 2008 22:59:45 +0000 Subject: [PATCH] Blue screen pagination: * Changed prompt and keys: Now it's 'q' to quit (abort) the debugger command and 's' to skip the following output. * Don't offer or try to quit a command in the boot debug output. * Cleanup the prompt and go to the next line also when aborting the command. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26348 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/debug/blue_screen.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/system/kernel/debug/blue_screen.cpp b/src/system/kernel/debug/blue_screen.cpp index 8b6a74f863..c9790db6e7 100644 --- a/src/system/kernel/debug/blue_screen.cpp +++ b/src/system/kernel/debug/blue_screen.cpp @@ -103,6 +103,8 @@ scroll_up(void) static void next_line(void) { + bool abortCommand = false; + #if USE_SCROLLING // TODO: scrolling is usually too slow; we could probably just remove it if (sScreen.y == sScreen.rows - 1) @@ -121,7 +123,9 @@ next_line(void) // Use the paging mechanism: either, we're in the debugger, and a // command is being executed, or we're currently showing boot debug // output - const char *text = "Press key to continue, Q to quit, A to abort"; + const char *text = in_command_invocation() + ? "Press key to continue, Q to quit, S to skip output" + : "Press key to continue, Q or S to skip output"; int32 length = strlen(text); if (sScreen.x + length > sScreen.columns) { // make sure we don't overwrite too much @@ -136,11 +140,10 @@ next_line(void) } char c = blue_screen_getchar(); - if (c == 'q') { + if (c == 's') { sScreen.ignore_output = true; - } else if (c == 'a') { - abort_debugger_command(); - // should not return + } else if (c == 'q') { + abortCommand = in_command_invocation(); sScreen.ignore_output = true; } @@ -162,6 +165,11 @@ next_line(void) } #endif sScreen.x = 0; + + if (abortCommand) { + abort_debugger_command(); + // should not return + } }