changeset 931:bb7a03cc1e43

rvtdump, tfc139: restore old 'TM:' output format
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 23 May 2023 06:04:29 +0000
parents a38430e03e73
children 3d1abb9f05ef
files rvinterf/lowlevel/format.c rvinterf/lowlevel/rvifmain.c
diffstat 2 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rvinterf/lowlevel/format.c	Tue May 23 05:59:17 2023 +0000
+++ b/rvinterf/lowlevel/format.c	Tue May 23 06:04:29 2023 +0000
@@ -103,6 +103,23 @@
 void
 print_tm_output_raw()
 {
+	int i;
+	char fmtbuf[MAX_PKT_FROM_TARGET*3+1];
+	char *dp = fmtbuf;
+
+	strcpy(dp, "TM:");
+	dp += 3;
+	for (i = 1; i < rxpkt_len; i++) {
+		sprintf(dp, " %02X", rxpkt[i]);
+		dp += 3;
+	}
+	*dp = '\0';
+	output_line(fmtbuf);
+}
+
+void
+print_tm_output_new()
+{
 	output_line("Rx Test Mode packet");
 	packet_hex_dump(rxpkt, (unsigned) rxpkt_len, output_cont);
 }
--- a/rvinterf/lowlevel/rvifmain.c	Tue May 23 05:59:17 2023 +0000
+++ b/rvinterf/lowlevel/rvifmain.c	Tue May 23 06:04:29 2023 +0000
@@ -205,7 +205,7 @@
 		return;
 	case RVT_TM_HEADER:
 		if (!no_output || logF)
-			print_tm_output_raw();
+			print_tm_output_new();
 		if (client_head)
 			forward_nonrvt_pkt();
 		return;