summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/command.c10
-rw-r--r--common/console.c11
2 files changed, 12 insertions, 9 deletions
diff --git a/common/command.c b/common/command.c
index 064ab710fb..45847eb07e 100644
--- a/common/command.c
+++ b/common/command.c
@@ -131,10 +131,10 @@ void u_boot_cmd_usage(cmd_tbl_t *cmdtp)
puts (cmdtp->help);
} else {
puts (cmdtp->name);
- putc (' ');
+ putchar (' ');
puts ("- No help available.\n");
}
- putc ('\n');
+ putchar ('\n');
#else /* no long help available */
if (cmdtp->usage) {
puts (cmdtp->usage);
@@ -473,7 +473,7 @@ int cmd_auto_complete(const char *const prompt, char *buf, int *np, int *colp)
if (i == 0) {
if (argc > 1) /* allow tab for non command */
return 0;
- putc('\a');
+ putchar('\a');
return 1;
}
@@ -500,7 +500,7 @@ int cmd_auto_complete(const char *const prompt, char *buf, int *np, int *colp)
k = len + seplen;
/* make sure it fits */
if (n + k >= CONFIG_CBSIZE - 2) {
- putc('\a');
+ putchar('\a');
return 1;
}
@@ -515,7 +515,7 @@ int cmd_auto_complete(const char *const prompt, char *buf, int *np, int *colp)
col += k;
puts(t - k);
if (sep == NULL)
- putc('\a');
+ putchar('\a');
*np = n;
*colp = col;
} else {
diff --git a/common/console.c b/common/console.c
index 47dcfe41d4..f359781e4d 100644
--- a/common/console.c
+++ b/common/console.c
@@ -27,7 +27,6 @@
#include <malloc.h>
#include <param.h>
#include <console.h>
-#include <exports.h>
#include <driver.h>
#include <fs.h>
#include <reloc.h>
@@ -211,7 +210,7 @@ int fputc(int fd, char c)
}
if (fd == 1)
- putc(c);
+ putchar(c);
else if (fd == 2)
eputc(c);
else
@@ -259,7 +258,7 @@ void fprintf (int file, const char *fmt, ...)
fputs (file, printbuffer);
}
-void printf (const char *fmt, ...)
+int printf (const char *fmt, ...)
{
va_list args;
uint i;
@@ -275,10 +274,12 @@ void printf (const char *fmt, ...)
/* Print the string */
puts (printbuffer);
+
+ return i;
}
-void vprintf (const char *fmt, va_list args)
+int vprintf (const char *fmt, va_list args)
{
uint i;
char printbuffer[CFG_PBSIZE];
@@ -290,6 +291,8 @@ void vprintf (const char *fmt, va_list args)
/* Print the string */
puts (printbuffer);
+
+ return i;
}
/* test if ctrl-c was pressed */