From: hadaq Date: Mon, 5 Apr 2010 22:32:18 +0000 (+0000) Subject: update rm command X-Git-Tag: v6.0~280 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=092ca437e8bb74eedd84e7bad069ac4b86b7a669;p=trbnettools.git update rm command --- diff --git a/libtrbnet/trbcmd.c b/libtrbnet/trbcmd.c index fd21391..4ea0483 100644 --- a/libtrbnet/trbcmd.c +++ b/libtrbnet/trbcmd.c @@ -35,7 +35,7 @@ static int hexMode = HEXMODE; -static const char trbcmd_version[] = "$Revision: 2.44 $"; +static const char trbcmd_version[] = "$Revision: 2.45 $"; #define BACKLOG 10 static uint16_t tcp_port = 55555; @@ -447,7 +447,9 @@ int start(int argc, char **argv) len = (*p >> 16) & 0xffff; fprintf(STDOUT, "H: 0x%04x 0x%04x\n", (*p++) & 0xffff, len); for (i = 0; (i < len) && (p < end); i++) { - fprintf(STDOUT, "0x%04x 0x%08x\n", reg_address + i, *p++); + fprintf(STDOUT, "0x%04x 0x%08x\n", + (option == 0 ? reg_address + i : i), + *p++); } } /* Check Status-Bits */ diff --git a/libtrbnet/trbnet.c b/libtrbnet/trbnet.c index 65f323f..e864178 100644 --- a/libtrbnet/trbnet.c +++ b/libtrbnet/trbnet.c @@ -1,4 +1,4 @@ -const char trbnet_version[] = "$Revision: 2.58 $"; +const char trbnet_version[] = "$Revision: 2.59 $"; #include #include @@ -703,6 +703,7 @@ static int trb_fifo_read(uint8_t channel, case HEADER_DAT: if (dataCtr < dsize) { + if (package.F0 == 0x0000) break; /* it a hack, ask Jan */ data[dataCtr++] = (((uint32_t)package.F1 << 16) | ((uint32_t)package.F2)); memLen++;