[PATCH 5/5] loads: Use putchar rather than console_putc

Sascha Hauer s.hauer at pengutronix.de
Tue Nov 17 03:10:51 PST 2015


'putchar' is a standard function to output a character. Use this one
instead of the lower level console_putc.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 commands/loads.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/commands/loads.c b/commands/loads.c
index 24093e1..aa3095e 100644
--- a/commands/loads.c
+++ b/commands/loads.c
@@ -127,7 +127,7 @@ static ulong load_serial(ulong offset)
 		}
 		if (!do_echo) {	/* print a '.' every 100 lines */
 			if ((++line_count % 100) == 0)
-				console_putc(CONSOLE_STDOUT, '.');
+				putchar('.');
 		}
 	}
 
@@ -144,7 +144,7 @@ static int read_record(char *buf, ulong len)
 	for (p=buf; p < buf+len; ++p) {
 		c = getc();		/* read character		*/
 		if (do_echo)
-			console_putc(CONSOLE_STDOUT, c);
+			putchar(c);
 
 		switch (c) {
 		case '\r':
@@ -259,7 +259,7 @@ static int write_record(char *buf)
 	char c;
 
 	while ((c = *buf++))
-		console_putc(CONSOLE_STDOUT, c);
+		putchar(c);
 
 	/* Check for the console hangup (if any different from serial) */
 
-- 
2.6.2




More information about the barebox mailing list