mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-26 16:20:03 +02:00
too much read from kernel flash for checksum validation
This commit is contained in:
parent
6569e4a8bf
commit
bf778b5336
@ -360,6 +360,10 @@ int verifyChecksumFromFlash(char *mess, char *functionType,
|
|||||||
("\tReached %lu bytes. Not reading more\n", totalBytesRead));
|
("\tReached %lu bytes. Not reading more\n", totalBytesRead));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// for less than 128 bytes
|
||||||
|
if ((readUnitSize + totalBytesRead) > fsize) {
|
||||||
|
readUnitSize = fsize - totalBytesRead;
|
||||||
|
}
|
||||||
bytes = fread(buf, 1, readUnitSize, fp);
|
bytes = fread(buf, 1, readUnitSize, fp);
|
||||||
totalBytesRead += bytes;
|
totalBytesRead += bytes;
|
||||||
}
|
}
|
||||||
|
@ -313,11 +313,13 @@ int eraseAndWriteToFlash(char *mess, enum PROGRAM_INDEX index,
|
|||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* remove condition when flash fpga and flash kernel fixed */
|
/* remove condition when flash fpga fixed */
|
||||||
/*if (verifyChecksumFromFlash(mess, messageType, clientChecksum,
|
if (index == PROGRAM_KERNEL) {
|
||||||
flashDriveName, fsize) == FAIL) {
|
if (verifyChecksumFromFlash(mess, messageType, clientChecksum,
|
||||||
return FAIL;
|
flashDriveName, fsize) == FAIL) {
|
||||||
}*/
|
return FAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (index == PROGRAM_FPGA) {
|
if (index == PROGRAM_FPGA) {
|
||||||
if (waitForFPGAtoTouchFlash(mess) == FAIL) {
|
if (waitForFPGAtoTouchFlash(mess) == FAIL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user