From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] cmd_nvedit: Make 'env import -c' require size parameter
Date: Tue, 4 Mar 2014 15:52:35 -0500 [thread overview]
Message-ID: <1393966355-9640-1-git-send-email-trini@ti.com> (raw)
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
next reply other threads:[~2014-03-04 20:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 20:52 Tom Rini [this message]
2014-03-07 22:29 ` [U-Boot] cmd_nvedit: Make 'env import -c' require size parameter Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1393966355-9640-1-git-send-email-trini@ti.com \
--to=trini@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox