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