summaryrefslogtreecommitdiffstats
path: root/common/console.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-11-11 12:25:53 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-11-11 16:19:48 +0100
commit1533f6b7b3300cc0fb99e98e16b2594236b81cd6 (patch)
tree95e5ec43934e444488fdc7554e4e8321d6b64c09 /common/console.c
parente57f57a3d0e6aab2bfb16ec258aa49daab1e8fe2 (diff)
downloadbarebox-1533f6b7b3300cc0fb99e98e16b2594236b81cd6.tar.gz
barebox-1533f6b7b3300cc0fb99e98e16b2594236b81cd6.tar.xz
fix fprintf prototype and return value
The puts functions now properly return the number of characters written. With this we can also fix fprintf. Also, remove never reached return in fputs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/console.c')
-rw-r--r--common/console.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/common/console.c b/common/console.c
index e82934b865..944dd07197 100644
--- a/common/console.c
+++ b/common/console.c
@@ -318,7 +318,6 @@ int fputs(int fd, const char *s)
return eputs(s);
else
return write(fd, s, strlen(s));
- return 0;
}
EXPORT_SYMBOL(fputs);
@@ -333,7 +332,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;
@@ -348,7 +347,7 @@ void fprintf (int file, const char *fmt, ...)
va_end (args);
/* Print the string */
- fputs (file, printbuffer);
+ return fputs(file, printbuffer);
}
EXPORT_SYMBOL(fprintf);