cmd_nvedit: Make 'env import -c' require size parameter
PATCH 1/1 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 <[email protected]>
Signed-off-by Tom Rini <[email protected]>
--- common/cmd_nvedit.c | 3 +++ 1 file changed, 3 insertions(+)
common/cmd_nvedit.c +3 -0
@@ -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;
Signature · 1 line
1.7.9.5
Quoted 6 lines · Tom Rini
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 <[email protected]>Signed-off-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140307/3bb6e572/attachment.pgp>