Skip to content
Snippets Groups Projects
Commit 3775dcd9 authored by Tom Rini's avatar Tom Rini
Browse files

cmd_nvedit: Make 'env import -c' require size parameter


When importing a checksummed area we need to be told how big the area in
question is so that we know that will match the size of the area which
the checksum is generated against.

Reported-by: default avatarPierre AUBERT <p.aubert@staubli.com>
Signed-off-by: default avatarTom Rini <trini@ti.com>
parent 801cec59
No related branches found
No related tags found
No related merge requests found
...@@ -1008,6 +1008,9 @@ static int do_env_import(cmd_tbl_t *cmdtp, int flag, ...@@ -1008,6 +1008,9 @@ static int do_env_import(cmd_tbl_t *cmdtp, int flag,
if (argc == 2) { if (argc == 2) {
size = simple_strtoul(argv[1], NULL, 16); size = simple_strtoul(argv[1], NULL, 16);
} else if (argc == 1 && chk) {
puts("## Error: external checksum format must pass size\n");
return CMD_RET_FAILURE;
} else { } else {
char *s = addr; char *s = addr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment