* [U-Boot] [PATCH] cmd_nvedit: Make 'env import -c' require size parameter
@ 2014-03-04 20:52 Tom Rini
2014-03-07 22:29 ` [U-Boot] " Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: Tom Rini @ 2014-03-04 20:52 UTC (permalink / raw)
To: u-boot
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>
---
common/cmd_nvedit.c | 3 +++
1 file changed, 3 insertions(+)
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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-07 22:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-04 20:52 [U-Boot] [PATCH] cmd_nvedit: Make 'env import -c' require size parameter Tom Rini
2014-03-07 22:29 ` [U-Boot] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox