summaryrefslogtreecommitdiffstats
path: root/arch/mips/lib/promlib.c
blob: dddfe98b4ded6233ea91845809805f9273683246 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);
}