diff options
Diffstat (limited to 'arch/mips/lib/promlib.c')
-rw-r--r-- | arch/mips/lib/promlib.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/mips/lib/promlib.c b/arch/mips/lib/promlib.c new file mode 100644 index 00000000000..dddfe98b4de --- /dev/null +++ b/arch/mips/lib/promlib.c @@ -0,0 +1,24 @@ +#include <stdarg.h> +#include <linux/kernel.h> + +extern void prom_putchar(char); + +void prom_printf(char *fmt, ...) +{ + va_list args; + char ppbuf[1024]; + char *bptr; + + va_start(args, fmt); + vsprintf(ppbuf, fmt, args); + + bptr = ppbuf; + + while (*bptr != 0) { + if (*bptr == '\n') + prom_putchar('\r'); + + prom_putchar(*bptr++); + } + va_end(args); +} |