X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fkeymile%2Fcommon%2Fcommon.c;h=a42f3eca33b3f22b1721879da42116d03b9f7d99;hb=192bc6948b02;hp=2ddb3da38f35f7245551bd66ebbffabd71f59420;hpb=ed1d98d801dfb6384d0f2fff45ce1ebf884944ca;p=u-boot diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c index 2ddb3da38f..a42f3eca33 100644 --- a/board/keymile/common/common.c +++ b/board/keymile/common/common.c @@ -168,7 +168,7 @@ static int do_setboardid(cmd_tbl_t *cmdtp, int flag, int argc, printf("can't get the IVM_Boardid\n"); return 1; } - sprintf((char *)buf, "%s", p); + strcpy((char *)buf, p); setenv("boardid", (char *)buf); printf("set boardid=%s\n", buf); @@ -177,7 +177,7 @@ static int do_setboardid(cmd_tbl_t *cmdtp, int flag, int argc, printf("can't get the IVM_HWKey\n"); return 1; } - sprintf((char *)buf, "%s", p); + strcpy((char *)buf, p); setenv("hwkey", (char *)buf); printf("set hwkey=%s\n", buf); printf("Execute manually saveenv for persistent storage.\n"); @@ -354,12 +354,16 @@ static int do_checktestboot(cmd_tbl_t *cmdtp, int flag, int argc, #if defined(CONFIG_POST) testpin = post_hotkeys_pressed(); - s = getenv("test_bank"); #endif +#if defined(CONFIG_MGCOGE3NE) + testpin = get_testpin(); +#endif + s = getenv("test_bank"); /* when test_bank is not set, act as if testpin is not asserted */ testboot = (testpin != 0) && (s); if (verbose) { printf("testpin = %d\n", testpin); + /* cppcheck-suppress nullPointer */ printf("test_bank = %s\n", s ? s : "not set"); printf("boot test app : %s\n", (testboot) ? "yes" : "no"); }