summaryrefslogtreecommitdiffstats
path: root/common/console.c
diff options
context:
space:
mode:
authorSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-09-21 09:09:06 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-09-21 09:09:06 +0200
commit0dd68e795ed43c6826a110e3a46696c6473fbb42 (patch)
treeec890814857e7421022a72511d6db4ccfbc02e2f /common/console.c
parentc36aba610128168d32b04393dd14b2f8e35518cf (diff)
downloadbarebox-0dd68e795ed43c6826a110e3a46696c6473fbb42.tar.gz
barebox-0dd68e795ed43c6826a110e3a46696c6473fbb42.tar.xz
- putc is now putchar for better standard conformity
- make printf return int
Diffstat (limited to 'common/console.c')
-rw-r--r--common/console.c11
1 files changed, 7 insertions, 4 deletions
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 */