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.5 1996/04/04 16:30:53 tridge 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 <linux/config.h>
   8 #include <asm/oplib.h>
   9 
  10 static char barg_buf[256];
  11 
  12 char *
  13 prom_getbootargs(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  14 {
  15         int iter;
  16         char *cp;
  17 
  18         switch(prom_vers) {
  19         case PROM_V0:
  20                 cp = barg_buf;
  21                 for(iter = 0; iter < 8; iter++) {
  22                         strcpy(cp, (*(romvec->pv_v0bootargs))->argv[iter]);
  23                         cp += strlen(cp); *cp++=' ';
  24                 }
  25                 *cp = 0;
  26                 break;
  27         case PROM_V2:
  28         case PROM_V3:
  29                 cp = barg_buf;
  30                 strcpy(cp, *romvec->pv_v2bootargs.bootpath);
  31                 cp += strlen(cp);
  32                 *cp++ = ' ';
  33                 strcpy(cp, *romvec->pv_v2bootargs.bootargs);
  34                 cp += strlen(cp);
  35                 *cp = 0;
  36                 break;
  37         case PROM_AP1000:
  38           /*
  39            * Get message from host boot process.
  40            */
  41 #if CONFIG_AP1000
  42                 ap_getbootargs(barg_buf);
  43 #endif          
  44                 break;
  45         default:
  46                 barg_buf[0] = 0;
  47                 break;
  48         }
  49         return barg_buf;
  50 }

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