From b62ad8b60fbffb1ea1c4d6ec711eb1423f66c79f Mon Sep 17 00:00:00 2001 From: hadaq Date: Sun, 8 Jan 2012 22:48:53 +0000 Subject: [PATCH] bugfix --- libtrbnet/trbcmd.c | 14 ++++---------- libtrbnet/trbnet.c | 6 ++---- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/libtrbnet/trbcmd.c b/libtrbnet/trbcmd.c index 16dadb8..290cafa 100644 --- a/libtrbnet/trbcmd.c +++ b/libtrbnet/trbcmd.c @@ -25,7 +25,7 @@ static int hexMode = HEXMODE; -static const char trbcmd_version[] = "$Revision: 2.75 $"; +static const char trbcmd_version[] = "$Revision: 2.76 $"; #define BACKLOG 10 static uint16_t tcp_port = 55555; @@ -108,7 +108,6 @@ void usage(const char *progName) fprintf(stdout, " -H hex-mode: all arguments will be interpreted " "as hexadecimal-numbers\n"); - fprintf(stdout, " -e put an EOF marker \"\" at end of output\n"); fprintf(stdout, " -V version number\n"); fprintf(stdout, "\nCommands:\n"); fprintf(stdout, " r -> " @@ -192,7 +191,6 @@ int start(int argc, char **argv) int loop = 1; int sleepTime = 0; int loopCtr = 0; - int eof_marker = 0; uint16_t trgCtr = 0; /* counter for the %ctr option */ int opt; int i; @@ -233,9 +231,6 @@ int start(int argc, char **argv) case 'H': hexMode = 1; break; - case 'e': - eof_marker = 1; - break; case 'V': printf("%s %s, using libtrbnet %s\n", basename(argv[0]), trbcmd_version, trbnet_version); @@ -1268,16 +1263,15 @@ int start(int argc, char **argv) logError(ERROR, "Invalid command, try -h option\n"); return -1; } - if (eof_marker == 1) { - fprintf(stdout, "\n"); + if (loop != 1) { + fprintf(stdout, "---\n"); + fflush(stdout); } } /* End script-file-loop */ trgCtr++; if (sleepTime > 0) { - printf("---\n"); - fflush(stdout); usleep(sleepTime); } } /* End repeat-loop */ diff --git a/libtrbnet/trbnet.c b/libtrbnet/trbnet.c index e312251..42303bc 100644 --- a/libtrbnet/trbnet.c +++ b/libtrbnet/trbnet.c @@ -1,4 +1,4 @@ -const char trbnet_version[] = "$Revision: 4.15 $ Local"; +const char trbnet_version[] = "$Revision: 4.16 $ Local"; #include #include @@ -20,9 +20,7 @@ const char trbnet_version[] = "$Revision: 4.15 $ Local"; #define PCIBAR 0 -#define DATA_BUFFER_SIZE 1048576 /* in 32-Bit words */ -static uint32_t dataBuffer[DATA_BUFFER_SIZE]; -//static uint32_t* dataBuffer = NULL; +static uint32_t dataBuffer[DMA_BUFFER_NUM_PAGES * 1024]; static unsigned int dataBufferSize = 0; static struct pexor_trbnet_io pexorDescriptor; -- 2.43.0