This source file includes following definitions.
- prom_getbootargs
1
2
3
4
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)
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
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 }