This source file includes following definitions.
- prom_getbootargs
1
2
3
4
5
6
7 #include <asm/oplib.h>
8
9 static char barg_buf[256];
10
11 char *
12 prom_getbootargs(void)
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 }