projects
/
bootcensus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added PS/2 mouse code
[bootcensus]
/
src
/
serial.c
diff --git
a/src/serial.c
b/src/serial.c
index
215276c
..
792f296
100644
(file)
--- a/
src/serial.c
+++ b/
src/serial.c
@@
-228,6
+228,11
@@
static int can_send(int fd)
void ser_putc(int fd, char c)
{
int base = ports[fd].base;
void ser_putc(int fd, char c)
{
int base = ports[fd].base;
+
+ if(c == '\n') {
+ ser_putc(fd, '\r');
+ }
+
while(!can_send(fd));
while((inb(base + UART_MSTAT) & MST_CTS) == 0);
outb(c, base + UART_DATA);
while(!can_send(fd));
while((inb(base + UART_MSTAT) & MST_CTS) == 0);
outb(c, base + UART_DATA);