From e6930063ef9e9900c97fd4ce3b4618b1dbeeebb6 Mon Sep 17 00:00:00 2001 From: hadaq Date: Mon, 7 Sep 2009 20:13:05 +0000 Subject: [PATCH] bugfix in selectMdcFlashRom --- trbrich/trbflash.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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"; -- 2.43.0