diff options
Diffstat (limited to 'src/console')
-rw-r--r-- | src/console/console.c | 9 | ||||
-rw-r--r-- | src/console/printk.c | 12 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/console/console.c b/src/console/console.c index 1712877801..d5aadf6f32 100644 --- a/src/console/console.c +++ b/src/console/console.c @@ -48,7 +48,7 @@ void console_tx_flush(void) } } -static void __console_tx_byte(unsigned char byte) +void console_tx_byte(unsigned char byte) { struct console_driver *driver; for(driver = console_drivers; driver < econsole_drivers; driver++) { @@ -56,13 +56,6 @@ static void __console_tx_byte(unsigned char byte) } } -void console_tx_byte(unsigned char byte) -{ - if (byte == '\n') - __console_tx_byte('\r'); - __console_tx_byte(byte); -} - unsigned char console_rx_byte(void) { struct console_driver *driver; diff --git a/src/console/printk.c b/src/console/printk.c index c61f63e6a6..63d37cc044 100644 --- a/src/console/printk.c +++ b/src/console/printk.c @@ -13,6 +13,13 @@ DECLARE_SPIN_LOCK(console_lock) +void do_putchar(unsigned char byte) +{ + if (byte == '\n') + console_tx_byte('\r'); + console_tx_byte(byte); +} + int do_printk(int msg_level, const char *fmt, ...) { va_list args; @@ -30,7 +37,7 @@ int do_printk(int msg_level, const char *fmt, ...) spin_lock(&console_lock); va_start(args, fmt); - i = vtxprintf(console_tx_byte, fmt, args); + i = vtxprintf(do_putchar, fmt, args); va_end(args); console_tx_flush(); @@ -44,7 +51,8 @@ int do_printk(int msg_level, const char *fmt, ...) #if CONFIG_CHROMEOS void do_vtxprintf(const char *fmt, va_list args) { - vtxprintf(console_tx_byte, fmt, args); + vtxprintf(do_putchar, fmt, args); console_tx_flush(); } #endif + |