summaryrefslogtreecommitdiffstats
path: root/common/console.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-07-05 18:02:03 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-07-05 18:02:03 +0200
commit758a1107f87b255678551ada7a090cc7ba28faec (patch)
treee8069c7d177feb6539709ac035025a4d6c58c161 /common/console.c
parent6877b3bde7929980137028c55161aea8424e6b1b (diff)
downloadbarebox-758a1107f87b255678551ada7a090cc7ba28faec.tar.gz
barebox-758a1107f87b255678551ada7a090cc7ba28faec.tar.xz
svn_rev_538
several powerpc fixes
Diffstat (limited to 'common/console.c')
-rw-r--r--common/console.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/common/console.c b/common/console.c
index 270c927fee..8f8e433b76 100644
--- a/common/console.c
+++ b/common/console.c
@@ -175,6 +175,24 @@ int fputs(int fd, const char *s)
return 0;
}
+void fprintf (int file, const char *fmt, ...)
+{
+ va_list args;
+ uint i;
+ char printbuffer[CFG_PBSIZE];
+
+ va_start (args, fmt);
+
+ /* For this to work, printbuffer must be larger than
+ * anything we ever want to print.
+ */
+ i = vsprintf (printbuffer, fmt, args);
+ va_end (args);
+
+ /* Print the string */
+ fputs (file, printbuffer);
+}
+
void printf (const char *fmt, ...)
{
va_list args;
@@ -193,6 +211,7 @@ void printf (const char *fmt, ...)
puts (printbuffer);
}
+
void vprintf (const char *fmt, va_list args)
{
uint i;