summaryrefslogtreecommitdiffstats
path: root/common/console_simple.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/console_simple.c')
-rw-r--r--common/console_simple.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/console_simple.c b/common/console_simple.c
index 9675cbb0a6..385da2fd86 100644
--- a/common/console_simple.c
+++ b/common/console_simple.c
@@ -16,8 +16,6 @@ int console_puts(unsigned int ch, const char *str)
while (*s) {
console_putc(ch, *s);
- if (*s == '\n')
- console_putc(ch, '\r');
s++;
i++;
}
@@ -29,13 +27,16 @@ EXPORT_SYMBOL(console_puts);
void console_putc(unsigned int ch, char c)
{
if (!console) {
+ if (c == '\n')
+ putc_ll('\r');
putc_ll(c);
return;
}
- console->putc(console, c);
if (c == '\n')
console->putc(console, '\r');
+
+ console->putc(console, c);
}
EXPORT_SYMBOL(console_putc);