diff options
author | Austin Clements <[email protected]> | 2009-09-20 23:09:59 -0400 |
---|---|---|
committer | Austin Clements <[email protected]> | 2009-09-20 23:09:59 -0400 |
commit | 3adc415471c8b53ef024cde0846c206372cbf04e (patch) | |
tree | 2913b101456bed96d4d0f57df072d0bd65718d42 | |
parent | 67f7909fe113d1e91cbafeaf3377da813cdcd382 (diff) | |
download | xv6-labs-3adc415471c8b53ef024cde0846c206372cbf04e.tar.gz xv6-labs-3adc415471c8b53ef024cde0846c206372cbf04e.tar.bz2 xv6-labs-3adc415471c8b53ef024cde0846c206372cbf04e.zip |
Hack to make newlines on the serial port work
-rw-r--r-- | console.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -205,6 +205,9 @@ consoleintr(int (*getc)(void)) break; default: if(c != 0 && input.e-input.r < INPUT_BUF){ + // The serial port produces 0x13, not 0x10 + if(c == '\r') + c = '\n'; input.buf[input.e++ % INPUT_BUF] = c; consputc(c); if(c == '\n' || c == C('D') || input.e == input.r+INPUT_BUF){ |