summaryrefslogtreecommitdiffstats
path: root/common/console.c
diff options
context:
space:
mode:
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;