root/arch/sparc/prom/bootstr.c

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

DEFINITIONS

This source file includes following definitions.
  1. prom_getbootargs

   1 /* bootstr.c:  Boot string/argument acquisition from the PROM.
   2  *
   3  * Copyright(C) 1995 David S. Miller (davem@caip.rutgers.edu)
   4  */
   5 
   6 #include <asm/oplib.h>
   7 
   8 static char barg_buf[128];
   9 
  10 char *
  11 prom_getbootargs(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  12 {
  13         int iter;
  14         char *cp;
  15 
  16         switch(prom_vers) {
  17         case PROM_V0:
  18                 cp = barg_buf;
  19                 for(iter = 0; iter < 8; iter++) {
  20                         strcpy(cp, (*(romvec->pv_v0bootargs))->argv[iter]);
  21                         cp += strlen(cp); *cp++=' ';
  22                 }
  23                 *cp = 0;
  24                 break;
  25         case PROM_V2:
  26         case PROM_V3:
  27                 cp = barg_buf;
  28                 strcpy(cp, *romvec->pv_v2bootargs.bootpath);
  29                 cp += strlen(cp);
  30                 *cp++ = ' ';
  31                 strcpy(cp, *romvec->pv_v2bootargs.bootargs);
  32                 cp += strlen(cp);
  33                 *cp = 0;
  34                 break;
  35         default:
  36                 barg_buf[0] = 0;
  37                 break;
  38         }
  39         return barg_buf;
  40 }

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