root/arch/sparc/prom/printf.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. prom_printf

   1 /* $Id: printf.c,v 1.4 1995/11/25 01:00:10 davem Exp $
   2  * printf.c:  Internal prom library printf facility.
   3  *
   4  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
   5  */
   6 
   7 /* This routine is internal to the prom library, no one else should know
   8  * about or use it!  It's simple and smelly anyway....
   9  */
  10 
  11 #include <linux/kernel.h>
  12 
  13 #include <asm/openprom.h>
  14 #include <asm/oplib.h>
  15 
  16 static char ppbuf[1024];
  17 
  18 void
  19 prom_printf(char *fmt, ...)
     /* [previous][next][first][last][top][bottom][index][help] */
  20 {
  21         va_list args;
  22         char ch, *bptr;
  23         int i;
  24 
  25         va_start(args, fmt);
  26         i = vsprintf(ppbuf, fmt, args);
  27 
  28         bptr = ppbuf;
  29 
  30         while((ch = *(bptr++)) != 0) {
  31                 if(ch == '\n')
  32                         prom_putchar('\r');
  33 
  34                 prom_putchar(ch);
  35         }
  36 
  37         va_end(args);
  38         return;
  39 }

/* [previous][next][first][last][top][bottom][index][help] */