diff options
author | Harsh Sharma <harsh.sharma@multitech.com> | 2022-10-21 17:04:35 -0500 |
---|---|---|
committer | Harsh Sharma <harsh.sharma@multitech.com> | 2022-10-21 17:04:35 -0500 |
commit | 37d7886022d0c90c1102f37ee5dd0704b2276730 (patch) | |
tree | 1482e7819f95aa5bfae8067a09205c9255290a6e | |
parent | b90d7dbdb64857b06b51552c115120ef042c1070 (diff) | |
download | mts-io-sysfs-37d7886022d0c90c1102f37ee5dd0704b2276730.tar.gz mts-io-sysfs-37d7886022d0c90c1102f37ee5dd0704b2276730.tar.bz2 mts-io-sysfs-37d7886022d0c90c1102f37ee5dd0704b2276730.zip |
[IN:4685] Fpga loader was not working
-rw-r--r-- | src/AccessoryCards/Mtac15Fpga.cpp | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/src/AccessoryCards/Mtac15Fpga.cpp b/src/AccessoryCards/Mtac15Fpga.cpp index ed30fe3..ef3b7bd 100644 --- a/src/AccessoryCards/Mtac15Fpga.cpp +++ b/src/AccessoryCards/Mtac15Fpga.cpp @@ -51,28 +51,21 @@ static const char *valid_hashes[3][4] = { { - "d9f811fcab57947db3c2323242885a32a7f095a069d3386a148466e7f3da53" - "53", /* mtcdt v28*/ - "903c1199df46d38683b1aa9fc88310abe2f317c01c3aefa77987990874aba4" - "20", /* mtcdt v31*/ - "7c190506b969aea6198daffb6c9b47685f3a4dc3ce18565c66542bac27d6f2" - "4e", /* mtcdt v33*/ - "72bcdfda72bf8677d585330caa3d609615d08d4ca6d7951f0ebbcb5a93306b" - "3c" /* mtcdt v35*/ + "d9f811fcab57947db3c2323242885a32a7f095a069d3386a148466e7f3da5353", /* v28*/ + "903c1199df46d38683b1aa9fc88310abe2f317c01c3aefa77987990874aba420", /* v31*/ + "7c190506b969aea6198daffb6c9b47685f3a4dc3ce18565c66542bac27d6f24e", /* v33*/ + "72bcdfda72bf8677d585330caa3d609615d08d4ca6d7951f0ebbcb5a93306b3c" /* v35*/ }, { - "54e41b186b2c91f1bcf249648c50357165d361101fc4fe20ee9b8f0c40dce2" - "5d" /* mtcdt3 v35*/ + "903c1199df46d38683b1aa9fc88310abe2f317c01c3aefa77987990874aba420", /* v31*/ + "7c190506b969aea6198daffb6c9b47685f3a4dc3ce18565c66542bac27d6f24e", /* v33*/ + "72bcdfda72bf8677d585330caa3d609615d08d4ca6d7951f0ebbcb5a93306b3c" /* v35*/ }, { - "07317fe9ca59393c074215c9d923d8d01025654883291a5e89b27d21668e22" - "63", /* mtcap v28*/ - "f208ef5cae03e703951bb8799172a5eaadb74ddb90bf3e65c32030c008a88e" - "75", /* mtcap v31*/ - "aaecd468b187703dbbf76022b00268dba2a5f25300da6486d420f476c83638" - "5c", /* mtcap v33*/ - "876cc5683f612c09f96bacb27fff170358c90f3bd76a5c61ec41504eabba83" - "13" /* mtcap v35*/ + "07317fe9ca59393c074215c9d923d8d01025654883291a5e89b27d21668e2263", /* v28*/ + "f208ef5cae03e703951bb8799172a5eaadb74ddb90bf3e65c32030c008a88e75", /* v31*/ + "aaecd468b187703dbbf76022b00268dba2a5f25300da6486d420f476c836385c", /* v33*/ + "876cc5683f612c09f96bacb27fff170358c90f3bd76a5c61ec41504eabba8313" /* v35*/ }, }; @@ -143,7 +136,7 @@ int Mtac15Fpga::sha256_file(const char *path) { for (i = 0; i < sizeof(valid_hashes[hardwareType]) / sizeof(valid_hashes[hardwareType][0]); ++i) { - if (!strcmp(valid_hashes[hardwareType][i], file_hash)) { + if (valid_hashes[hardwareType][i] && !strcmp(valid_hashes[hardwareType][i], file_hash)) { printInfo("File verified"); return 0; } |