source: trunk/target/linux/lantiq/patches-3.0/230-cmdline_hack.patch @ 28308

Last change on this file since 28308 was 28308, checked in by blogic, 5 years ago

[lantiq]

  • rebase 3.0 patches
  • fold some fixes into existing patches
File size: 895 bytes
  • arch/mips/lantiq/prom.c

    a b void prom_free_prom_memory(void) 
    3939{ 
    4040} 
    4141 
     42#ifdef CONFIG_IMAGE_CMDLINE_HACK 
     43extern char __image_cmdline[]; 
     44 
     45static void __init 
     46prom_init_image_cmdline(void) 
     47{ 
     48        char *p = __image_cmdline; 
     49        int replace = 0; 
     50 
     51        if (*p == '-') { 
     52                replace = 1; 
     53                p++; 
     54        } 
     55 
     56        if (*p == '\0') 
     57                return; 
     58 
     59        if (replace) { 
     60                strlcpy(arcs_cmdline, p, sizeof(arcs_cmdline)); 
     61        } else { 
     62                strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline)); 
     63                strlcat(arcs_cmdline, p, sizeof(arcs_cmdline)); 
     64        } 
     65} 
     66#else 
     67static void __init prom_init_image_cmdline(void) { return; } 
     68#endif 
     69 
    4270static void __init prom_init_cmdline(void) 
    4371{ 
    4472        int argc = fw_arg0; 
    static void __init prom_init_cmdline(voi 
    5583                        strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline)); 
    5684                } 
    5785        } 
     86        prom_init_image_cmdline(); 
    5887} 
    5988 
    6089void __init prom_init(void) 
Note: See TracBrowser for help on using the repository browser.