|
|
@@ -571,7 +571,7 @@ static int md5_check(buf_t *fb)
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
|
-static void upg_print(fw_hdr_t *h)
|
|
|
+static void print_hdr(fw_hdr_t *h)
|
|
|
{
|
|
|
char magic[20]={0};
|
|
|
|
|
|
@@ -598,9 +598,9 @@ int upg_board_file_check(char *path)
|
|
|
}
|
|
|
|
|
|
fw_hdr_t *fh=(fw_hdr_t*)fb.buf;
|
|
|
- if(memcmp(fh->hdr.magic,FW_HEAD_MAGIC,sizeof(FW_HEAD_MAGIC))) {
|
|
|
+ if(memcmp(fh->hdr.magic,FW_HEAD_MAGIC,sizeof(fh->hdr.magic))) {
|
|
|
LOGE("not found %s, invalid board firmware\n", FW_HEAD_MAGIC);
|
|
|
- upg_print(fh);
|
|
|
+ print_hdr(fh);
|
|
|
r = UPG_HDR_FAIL;
|
|
|
}
|
|
|
else {
|