summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-06-24 19:14:36 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-06-24 19:14:36 +0200
commitfd0782099cab0988311aa80d4a6b0871a6403084 (patch)
tree748844cf4ec61cf01874c5a3d6af801044ba6f0e
parent07b9d3e4bdfb8857bb895dfee3e119bc451cc680 (diff)
downloadabaos-fd0782099cab0988311aa80d4a6b0871a6403084.tar.gz
abaos-fd0782099cab0988311aa80d4a6b0871a6403084.tar.bz2
fixed the console output to VGA text mode to also wipe the rest of a line
on newline
-rw-r--r--src/kernel/console.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/kernel/console.c b/src/kernel/console.c
index 6113823..8caefc8 100644
--- a/src/kernel/console.c
+++ b/src/kernel/console.c
@@ -46,7 +46,13 @@ void console_put_string( console_t *console, const char *s )
void console_put_newline( console_t *console )
{
if( console->vga_text != NULL ) {
- vga_text_put_newline( console->vga_text );
+ // wipe contents till the end of the line on the
+ // VGA text console, old data could still be there
+ // from the BIOS(es)
+ int x = vga_text_get_cursor_x( console->vga_text );
+ for( int i = x; i < console->vga_text->res_x; i++ ) {
+ vga_text_put_char( console->vga_text, ' ' );
+ }
}
if( console->serial != NULL ) {