patch-2.4.7 linux/arch/mips64/arc/console.c
Next file: linux/arch/mips64/arc/identify.c
Previous file: linux/arch/mips64/arc/cmdline.c
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Wed Jul 4 11:50:39 2001
- Orig file:
v2.4.6/linux/arch/mips64/arc/console.c
- Orig date:
Tue Nov 28 21:42:04 2000
diff -u --recursive --new-file v2.4.6/linux/arch/mips64/arc/console.c linux/arch/mips64/arc/console.c
@@ -6,22 +6,28 @@
* Copyright (C) 1996 David S. Miller (dm@sgi.com)
*/
#include <linux/init.h>
+#include <linux/kernel.h>
#include <asm/sgialib.h>
-void prom_putchar(char c)
+static char ppbuf[1024];
+
+void prom_printf(char *fmt, ...)
{
- ULONG cnt;
- CHAR it = c;
+ va_list args;
+ char ch, *bptr;
+ int i;
- ArcWrite(1, &it, 1, &cnt);
-}
+ va_start(args, fmt);
+ i = vsprintf(ppbuf, fmt, args);
-char __init prom_getchar(void)
-{
- ULONG cnt;
- CHAR c;
+ bptr = ppbuf;
- ArcRead(0, &c, 1, &cnt);
+ while((ch = *(bptr++)) != 0) {
+ if(ch == '\n')
+ prom_putchar('\r');
- return c;
+ prom_putchar(ch);
+ }
+ va_end(args);
+ return;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)