@@ -327,7 +327,7 @@ void console_flush(void)
}
EXPORT_SYMBOL(console_flush);
-void fprintf (int file, const char *fmt, ...)
+int fprintf (int file, const char *fmt, ...)
{
va_list args;
uint i;
@@ -343,6 +343,8 @@ void fprintf (int file, const char *fmt, ...)
/* Print the string */
fputs (file, printbuffer);
+
+ return i;
}
EXPORT_SYMBOL(fprintf);
@@ -54,7 +54,7 @@ int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);
#define stderr 2
#define MAX_FILES 128
-void fprintf(int file, const char *fmt, ...) __attribute__ ((format(__printf__, 2, 3)));
+int fprintf(int file, const char *fmt, ...) __attribute__ ((format(__printf__, 2, 3)));
int fputs(int file, const char *s);
int fputc(int file, const char c);
int ftstc(int file);
For consistency, let fprintf return an int just like it's regular libc implementation and all the other printf variations barebox has. This also fixes a warning on variable i being never read in the function. Signed-off-by: Loïc Minier <loic.minier@linaro.org> --- common/console.c | 4 +++- include/stdio.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-)