linux/3.3: refresh patches against 3.3-rc5
[openwrt.git] / target / linux / lantiq / patches / 203-owrt-cmdline.patch
1 --- a/arch/mips/lantiq/prom.c
2 +++ b/arch/mips/lantiq/prom.c
3 @@ -43,6 +43,34 @@ void prom_free_prom_memory(void)
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 @@ -59,6 +87,7 @@ static void __init prom_init_cmdline(voi
39 strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline));
40 }
41 }
42 + prom_init_image_cmdline();
43 }
44
45 void __iomem *ltq_remap_resource(struct resource *res)
This page took 0.056021 seconds and 5 git commands to generate.