terminal_log: carriage-return on newline

This is expected by hardware terminals, ie., terminal programs connected
to null-modem serial connections. Otherwise, the next line starts at the
column right after the last line.
This commit is contained in:
Christian Helmuth 2017-07-07 12:02:53 +02:00
parent 178795f2ec
commit e5f0dae598

View File

@ -83,6 +83,9 @@ namespace Genode {
if ((len > 0) && (string[len - 1] != '\n'))
_terminal.write("\n", 1);
/* carriage-return as expected by hardware terminals on newline */
_terminal.write("\r", 1);
return len;
}
};