Browse Source

ls3a7a dtb cmdline size limited to 512.

Change-Id: I25710e0ac70c8db3c4b732b4a41c698cf9aa7cae
Signed-off-by: QiaoChong <qiaochong@loongson.cn>
master
QiaoChong 5 years ago
parent
commit
d121df32a1
  1. 10
      Targets/Bonito3a3000_7a/dev/load_dtb.c

10
Targets/Bonito3a3000_7a/dev/load_dtb.c

@ -207,17 +207,19 @@ static int fdt_parse_prop(char * const *newval, int count, char *data, int *len)
return 0;
}
#define COMMAND_LINE_SIZE 512
static int update_bootarg(int ac, char ** av, void * ssp)
{
int i, len = 0, ret;
char new_arg[200];
char new_arg[COMMAND_LINE_SIZE + 2];
char *p;
int nodeoffset;
p = new_arg;
for (i = 1; i < ac; i++) {
strcpy(p, av[i]);
p += strlen(av[i]);
for (i = 1; i < ac && new_arg - p < COMMAND_LINE_SIZE; i++) {
strncpy(p, av[i], new_arg + COMMAND_LINE_SIZE - p);
p += min(strlen(av[i]), new_arg + COMMAND_LINE_SIZE - p);
*p = ' ';
p++;
}

Loading…
Cancel
Save