mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
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: Pierre AUBERT <p.aubert@staubli.com> Signed-off-by: Tom Rini <trini@ti.com>
This commit is contained in:
parent
801cec5907
commit
3775dcd9c4
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue