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

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