mirror of
https://github.com/usatiuk/ficus.git
synced 2025-10-28 16:17:51 +01:00
SerialTty: echo newline properly
This commit is contained in:
@@ -21,7 +21,11 @@ void SerialTty::putstr(const char *str) {
|
||||
static int read() {
|
||||
if (!(inb(PORT + 5) & 1)) return -1;
|
||||
char r = inb(PORT);
|
||||
write_serial(r);
|
||||
if (r == '\n' || r == '\r') {
|
||||
write_serial('\n');
|
||||
write_serial('\r');
|
||||
} else
|
||||
write_serial(r);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user