source: trunk/target/linux/lantiq/patches-2.6.32/230-cmdline_hack.patch @ 27026

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

[lantiq]

  • backport 2.6.8 patches to .39 / .32.33
  • remove lqtapi
  • bump tapi/dsl to .39
  • migrate to new ltq_ style api
  • add amazon_se support
File size: 821 bytes
  • arch/mips/lantiq/prom.c

    a b  
    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; 
     
    5381                        strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline)); 
    5482                } 
    5583        } 
     84        prom_init_image_cmdline(); 
    5685} 
    5786 
    5887void __init prom_init(void) 
Note: See TracBrowser for help on using the repository browser.