From: hadaq Date: Wed, 2 Sep 2009 16:03:33 +0000 (+0000) Subject: do not protect mdc sector at end of programming X-Git-Tag: v6.0~382 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=d7311d389da226afbc4431d40185a5a7a713354a;p=trbnettools.git do not protect mdc sector at end of programming --- diff --git a/trbrich/trbflash.c b/trbrich/trbflash.c index ab7d75e..efb1f2a 100644 --- a/trbrich/trbflash.c +++ b/trbrich/trbflash.c @@ -61,6 +61,8 @@ static const char FlashTypeStr[][16] = {"INVALID", "ADCM1", "ADCM2", "MDC"}; static FlashType flashType = FLASH_INVALID; +#define VERSION_NUMBER "2.00 20090902" + /* ------ Local Functions ----------------------------------------------- */ static void atexit0() @@ -837,6 +839,7 @@ void usage(const char *progName) progName); printf("Options:\n"); printf(" -h give this help\n"); + printf(" -V Version number\n"); printf("\nCommands:\n"); printf(" program -> " "program bit-file to flash-memory\n"); @@ -858,7 +861,7 @@ int main(int argc, char ** argv) logFile = stderr; /* Parse Arguments */ - while ((i = getopt(argc, argv, "+hd:")) != -1) { + while ((i = getopt(argc, argv, "+hd:V")) != -1) { switch (i) { case '?': usage(basename(argv[0])); @@ -869,6 +872,10 @@ int main(int argc, char ** argv) case 'd': trb_debug = strtoul(optarg, NULL, 0); break; + case 'V': + printf("trbflash %s\n", VERSION_NUMBER); + exit(EXIT_SUCCESS); + break; default: usage(basename(argv[0])); exit(EXIT_FAILURE);