Esempio n. 1
0
void __init prom_init_cmdline(void)
{
	char *cp;
	int actr, i;

	actr = 1; /* Always ignore argv[0] */

	cp = &(arcs_cmdline[0]);
	while(actr < prom_argc) {
		for(i = 0; i < NENTS(ignored); i++) {
			int len = strlen(ignored[i]);

			if(!strncmp(prom_argv(actr), ignored[i], len))
				goto pic_cont;
		}
		/* Ok, we want it. */
		strcpy(cp, prom_argv(actr));
		cp += strlen(prom_argv(actr));
		*cp++ = ' ';

	pic_cont:
		actr++;
	}
	if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */
		--cp;
	*cp = '\0';

#ifdef DEBUG_CMDLINE
	prom_printf("prom_init_cmdline: %s\n", &(arcs_cmdline[0]));
#endif
}
Esempio n. 2
0
void  __init prom_init_cmdline(void)
{
#ifdef CONFIG_UBOOT_CMDLINE
	int actr=1; /* Always ignore argv[0] */
#endif
	char *cp;

	cp = &(arcs_cmdline[0]);
#ifdef CONFIG_UBOOT_CMDLINE
	if (prom_argc > 1) {
		while(actr < prom_argc) {
			strcpy(cp, prom_argv(actr));
			cp += strlen(prom_argv(actr));
			*cp++ = ' ';
			actr++;
		}
	} else
#endif
	{
		strcpy(cp, rt2880_cmdline);
		cp += strlen(rt2880_cmdline);
		*cp++ = ' ';
	}

	if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */
		--cp;
	*cp = '\0';
}
Esempio n. 3
0
void  __init prom_init_cmdline(void)
{
	char *cp;
	int actr=1; /* Always ignore argv[0] */

	cp = &(arcs_cmdline[0]);

#if defined CONFIG_CMDLINE_BOOL
	strcpy(cp, CONFIG_CMDLINE);
	cp += strlen(CONFIG_CMDLINE);
	*cp++ = ' ';
#else
	strcpy(cp, rt2880_cmdline);
	cp += strlen(rt2880_cmdline);
	*cp++ = ' ';
#endif

	while(actr < prom_argc) {
	    strcpy(cp, prom_argv(actr));
	    cp += strlen(prom_argv(actr));
	    *cp++ = ' ';
	    actr++;
	}
	if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */
	    --cp;
	*cp = '\0';
	
}
Esempio n. 4
0
void  __init prom_init_cmdline(void)
{
	char *cp;
#ifdef CONFIG_UBOOT_CMDLINE
	int actr=1; /* Always ignore argv[0] */
#endif

	cp = &(arcs_cmdline[0]);

#ifdef CONFIG_UBOOT_CMDLINE
	while(actr < prom_argc) {
	    strcpy(cp, prom_argv(actr));
	    cp += strlen(prom_argv(actr));
	    *cp++ = ' ';
	    actr++;
	}
#else
	strcpy(cp, rt2880_cmdline);
	cp += strlen(rt2880_cmdline);
	*cp++ = ' ';
#endif

#if defined(CONFIG_MTD_UBI)
	/* Init. UBI driver */
	strcpy(cp, ubi_param);
	cp += strlen(ubi_param);
	*cp++ = ' ';
#endif

	if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */
	    --cp;
	*cp = '\0';
	
}
Esempio n. 5
0
File: cmdline.c Progetto: nhanh0/hah
static char * __init move_firmware_args(char* cp)
{
    char *s;
    int actr, i;

    actr = 1; /* Always ignore argv[0] */

    while (actr < prom_argc) {
        for(i = 0; i < NENTS(used_arc); i++) {
            int len = strlen(used_arc[i][0]);

            if (!strncmp(prom_argv(actr), used_arc[i][0], len)) {
                /* Ok, we want it. First append the replacement... */
                strcat(cp, used_arc[i][1]);
                cp += strlen(used_arc[i][1]);
                /* ... and now the argument */
                s = strstr(prom_argv(actr), "=");
                if (s) {
                    s++;
                    strcpy(cp, s);
                    cp += strlen(s);
                }
                *cp++ = ' ';
                break;
            }
        }
        actr++;
    }

    return cp;
}
Esempio n. 6
0
void  __init prom_init_cmdline(void)
{
	char *cp;
	int actr;

	actr = 1; /* Always ignore argv[0] */

	cp = &(arcs_cmdline[0]);
	while (actr < prom_argc) {
		strcpy(cp, prom_argv(actr));
		cp += strlen(prom_argv(actr));
		*cp++ = ' ';
		actr++;
	}
	if (cp != &(arcs_cmdline[0])) {
		/* get rid of trailing space */
		--cp;
		*cp = '\0';
	}
}
Esempio n. 7
0
File: cmdline.c Progetto: nhanh0/hah
void __init prom_init_cmdline(void)
{
    char *cp;
    int actr, i;

    actr = 1; /* Always ignore argv[0] */

    cp = &(arcs_cmdline[0]);
    /*
     * Move ARC variables to the beginning to make sure they can be
     * overridden by later arguments.
     */
    cp = move_firmware_args(cp);

    while (actr < prom_argc) {
        for (i = 0; i < NENTS(ignored); i++) {
            int len = strlen(ignored[i]);

            if (!strncmp(prom_argv(actr), ignored[i], len))
                goto pic_cont;
        }
        /* Ok, we want it. */
        strcpy(cp, prom_argv(actr));
        cp += strlen(prom_argv(actr));
        *cp++ = ' ';

pic_cont:
        actr++;
    }
    if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */
        --cp;
    *cp = '\0';

#ifdef DEBUG_CMDLINE
    prom_printf("prom_init_cmdline: %s\n", &(arcs_cmdline[0]));
#endif
}