Patchwork [U-Boot,1/4] km/common: add printings to boardid commands

login
register
mail settings
Submitter Holger Brunck
Date July 5, 2011, 8:23 a.m.
Message ID <1309854242-11354-2-git-send-email-holger.brunck@keymile.com>
Download mbox | patch
Permalink /patch/103215/
State Accepted
Commit 9485e779a3fb969e026c145bfa645083404e0c1e
Headers show

Comments

Holger Brunck - July 5, 2011, 8:23 a.m.
Be verbose if do_setboardid was called and print
correct names of variables in do_checkboardidhwk.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
---
 board/keymile/common/common.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
Wolfgang Denk - July 28, 2011, 1:39 p.m.
Dear Holger Brunck,

In message <1309854242-11354-2-git-send-email-holger.brunck@keymile.com> you wrote:
> Be verbose if do_setboardid was called and print
> correct names of variables in do_checkboardidhwk.
> 
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
> cc: Valentin Longchamp <valentin.longchamp@keymile.com>
> cc: Heiko Schocher <hs@denx.de>
> cc: Wolfgang Denk <wd@denx.de>
> ---
>  board/keymile/common/common.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c
index 841bdee..7f388e1 100644
--- a/board/keymile/common/common.c
+++ b/board/keymile/common/common.c
@@ -270,6 +270,7 @@  static int do_setboardid(cmd_tbl_t *cmdtp, int flag, int argc,
 	}
 	sprintf((char *)buf, "%s", p);
 	setenv("boardid", (char *)buf);
+	printf("set boardid=%s\n", buf);
 
 	p = get_local_var("IVM_HWKey");
 	if (p == NULL) {
@@ -278,6 +279,8 @@  static int do_setboardid(cmd_tbl_t *cmdtp, int flag, int argc,
 	}
 	sprintf((char *)buf, "%s", p);
 	setenv("hwkey", (char *)buf);
+	printf("set hwkey=%s\n", buf);
+	printf("Execute manually saveenv for persistent storage.\n");
 
 	return 0;
 }
@@ -421,7 +424,8 @@  int do_checkboardidhwk(cmd_tbl_t *cmdtp, int flag, int argc,
 		printf("boardid=0x%3lX, hwkey=%ld\n", envbid, envhwkey);
 		rc = 0; /* match */
 	} else {
-		printf("Error: env bId=0x%3lX, hwKey=%ld\n", envbid, envhwkey);
+		printf("Error: env boardid=0x%3lX, hwkey=%ld\n", envbid,
+			envhwkey);
 		printf("       IVM bId=0x%3lX, hwKey=%ld\n", ivmbid, ivmhwkey);
 		rc = 1; /* don't match */
 	}