diff options
author | Tom Rini <trini@ti.com> | 2014-03-04 15:52:35 -0500 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-03-07 10:59:06 -0500 |
commit | 3775dcd9c4ad9d7f19f2ff14989f5180aaba3d64 (patch) | |
tree | 7a074d67c4f00378e500c082eca52d5c9bcb06e0 /common | |
parent | 801cec59076b0d5b0b6946a8a7a6cb77b62f3c8f (diff) | |
download | u-boot-imx-3775dcd9c4ad9d7f19f2ff14989f5180aaba3d64.zip u-boot-imx-3775dcd9c4ad9d7f19f2ff14989f5180aaba3d64.tar.gz u-boot-imx-3775dcd9c4ad9d7f19f2ff14989f5180aaba3d64.tar.bz2 |
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>
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_nvedit.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index 5bcc324..c53601c 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -1008,6 +1008,9 @@ static int do_env_import(cmd_tbl_t *cmdtp, int flag, if (argc == 2) { 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 { char *s = addr; |