https://github.com/torvalds/linux
Raw File
Tip revision: 606135a3081e045b677cde164a296c51f66c4633 authored by Linus Torvalds on 28 February 2007, 04:59:12 UTC
Linux 2.6.21-rc2
Tip revision: 606135a
promlib.c
#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);
}
back to top