} FlashParam;
static FlashParam flashParamRef;
-static const char trbflash_version[] = "$Revision: 2.39 $";
+static const char trbflash_version[] = "$Revision: 2.40 $";
static uint32_t mdcFlashSelect = 1;
while (strlen(flashParamRef.allowedStringId[j]) > 0) {
if (memcmp(imageBuffer + i,
flashParamRef.allowedStringId[j],
- strlen(flashParamRef.allowedStringId[j]))) {
+ strlen(flashParamRef.allowedStringId[j])) == 0) {
match = 1;
break;
}
+ j++;
}
}
if ((skipFirmwareIdCheck == 0) && (match == 0)) {
fprintf(logFile, "Error > prepareImageBuffer: "
- "invalid Firmware-Id of Image-File\n");
+ "invalid Firmware-Id of Image-File, should be one of:\n");
+ for (i = 0; strlen(flashParamRef.allowedStringId[i]) > 0; i++) {
+ fprintf(logFile, " %s\n", flashParamRef.allowedStringId[i]);
+ }
return -1;
}
}
/* In case of MDC: select FlashRom */
- if ((flashParamRef.flashType == FLASH_MDC_OEP_V2) || (flashParamRef.flashType == FLASH_MDC_OEP_V3)) {
+ if ((flashParamRef.flashType == FLASH_MDC_OEP_V2) ||
+ (flashParamRef.flashType == FLASH_MDC_OEP_V3)) {
if (selectMdcFlashRom(trb_address, mdcFlashSelect) == -1) {
exit(EXIT_FAILURE);
}