From: hadaq Date: Mon, 7 Sep 2009 20:13:05 +0000 (+0000) Subject: bugfix in selectMdcFlashRom X-Git-Tag: v6.0~352 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=e6930063ef9e9900c97fd4ce3b4618b1dbeeebb6;p=trbnettools.git bugfix in selectMdcFlashRom --- diff --git a/trbrich/trbflash.c b/trbrich/trbflash.c index f8042dc..9234b42 100644 --- a/trbrich/trbflash.c +++ b/trbrich/trbflash.c @@ -63,7 +63,7 @@ static const char FlashTypeStr[][16] = {"INVALID", "ADCM1", "ADCM2", "MDC"}; static FlashType flashType = FLASH_INVALID; -static const char trbflash_version[] = "$Revision: 2.03 $"; +static const char trbflash_version[] = "$Revision: 2.04 $"; static uint32_t mdcFlashSelect = 1; @@ -871,6 +871,8 @@ static int selectMdcFlashRom(uint16_t trb_address, uint8_t number) { trb_strerror(trb_errno)); return -1; } + + return 0; } /* ------ MAIN ---------------------------------------------------------- */ @@ -1221,19 +1223,19 @@ int main(int argc, char ** argv) fprintf(stderr, "Invalid ManId(s), aborting\n"); exit(EXIT_FAILURE); } - + /* In case of MDC: select FlashRom */ if (flashType == FLASH_MDC) { if (selectMdcFlashRom(trb_address, mdcFlashSelect) == -1) { exit(EXIT_FAILURE); } } - + if ((status = readPage(trb_address, pageNumber, 256)) == -1) { fprintf(stderr, "Error reading Page, aborting\n"); exit(EXIT_FAILURE); } - + for (i = 0; i < status; i++) { char text[32] = ""; char cc[2] = " \0";