ar71xx: ag71xx: prepare to make ring sizes configurable
[openwrt.git] / target / linux / lantiq / patches-2.6.32 / 230-cmdline_hack.patch
1 --- a/arch/mips/lantiq/prom.c
2 +++ b/arch/mips/lantiq/prom.c
3 @@ -39,6 +39,34 @@
4 {
5 }
6
7 +#ifdef CONFIG_IMAGE_CMDLINE_HACK
8 +extern char __image_cmdline[];
9 +
10 +static void __init
11 +prom_init_image_cmdline(void)
12 +{
13 + char *p = __image_cmdline;
14 + int replace = 0;
15 +
16 + if (*p == '-') {
17 + replace = 1;
18 + p++;
19 + }
20 +
21 + if (*p == '\0')
22 + return;
23 +
24 + if (replace) {
25 + strlcpy(arcs_cmdline, p, sizeof(arcs_cmdline));
26 + } else {
27 + strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline));
28 + strlcat(arcs_cmdline, p, sizeof(arcs_cmdline));
29 + }
30 +}
31 +#else
32 +static void __init prom_init_image_cmdline(void) { return; }
33 +#endif
34 +
35 static void __init prom_init_cmdline(void)
36 {
37 int argc = fw_arg0;
38 @@ -53,6 +81,7 @@
39 strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline));
40 }
41 }
42 + prom_init_image_cmdline();
43 }
44
45 void __init prom_init(void)
This page took 0.041209 seconds and 5 git commands to generate.