Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Feb 2018 18:26:45 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r329331 - head/usr.sbin/trpt
Message-ID:  <201802151826.w1FIQjxk095386@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Thu Feb 15 18:26:45 2018
New Revision: 329331
URL: https://svnweb.freebsd.org/changeset/base/329331

Log:
  trpt(8): Fully remove and undocument '-t' option disabled in 1999
  
  The relevant code was commented out in r50680.
  
  PR:		57045
  Submitted by:	Fernando ApesteguĂ­a <fernando.apesteguia AT gmail.com>

Modified:
  head/usr.sbin/trpt/trpt.8
  head/usr.sbin/trpt/trpt.c

Modified: head/usr.sbin/trpt/trpt.8
==============================================================================
--- head/usr.sbin/trpt/trpt.8	Thu Feb 15 18:19:25 2018	(r329330)
+++ head/usr.sbin/trpt/trpt.8	Thu Feb 15 18:26:45 2018	(r329331)
@@ -28,7 +28,7 @@
 .\"     @(#)trpt.8	8.2 (Berkeley) 12/11/93
 .\" $FreeBSD$
 .\"
-.Dd December 11, 1993
+.Dd February 15, 2018
 .Dt TRPT 8
 .Os
 .Sh NAME
@@ -41,7 +41,6 @@
 .Op Fl j
 .Op Fl p Ar hex-address
 .Op Fl s
-.Op Fl t
 .Oo
 .Ar system Op Ar core
 .Oc
@@ -86,10 +85,6 @@ control block at the given address
 In addition to the normal output,
 print a detailed description of the packet
 sequencing information.
-.It Fl t
-In addition to the normal output,
-print the values for all timers at each
-point in the trace.
 .El
 .Pp
 The recommended use of

Modified: head/usr.sbin/trpt/trpt.c
==============================================================================
--- head/usr.sbin/trpt/trpt.c	Thu Feb 15 18:19:25 2018	(r329330)
+++ head/usr.sbin/trpt/trpt.c	Thu Feb 15 18:26:45 2018	(r329331)
@@ -90,7 +90,7 @@ struct nlist nl[3];
 
 static caddr_t tcp_pcbs[TCP_NDEBUG];
 static n_time ntime;
-static int aflag, kflag, memf, follow, sflag, tflag;
+static int aflag, kflag, memf, follow, sflag;
 
 void dotrace(caddr_t);
 void klseek(int, off_t, int);
@@ -108,7 +108,7 @@ main(int argc, char **argv)
 	nl[1].n_name = strdup("_tcp_debx");
 
 	jflag = npcbs = 0;
-	while ((ch = getopt(argc, argv, "afjp:st")) != -1)
+	while ((ch = getopt(argc, argv, "afjp:s")) != -1)
 		switch (ch) {
 		case 'a':
 			++aflag;
@@ -128,9 +128,6 @@ main(int argc, char **argv)
 		case 's':
 			++sflag;
 			break;
-		case 't':
-			++tflag;
-			break;
 		case '?':
 		default:
 			usage();
@@ -216,7 +213,7 @@ static void
 usage()
 {
 	(void)fprintf(stderr,
-		"usage: trpt [-afjst] [-p hex-address] [system [core]]\n");
+		"usage: trpt [-afjs] [-p hex-address] [system [core]]\n");
 	exit(1);
 }
 
@@ -427,28 +424,6 @@ tcp_trace(short act, short ostate, struct tcpcb *tp, i
 		    (u_long)tp->snd_wl1,
 		    (u_long)tp->snd_wl2, (u_long)tp->snd_wnd);
 	}
-	/* print out timers? */
-#if 0
-	/*
-	 * XXX 
-	 * kernel now uses callouts, not integer time values.
-	 */
-	if (tflag) {
-		register char *cp = "\t";
-		register int i;
-
-		for (i = 0; i < TCPT_NTIMERS; i++) {
-			if (tp->t_timer[i] == 0)
-				continue;
-			printf("%s%s=%d", cp, tcptimers[i], tp->t_timer[i]);
-			if (i == TCPT_REXMT)
-				printf(" (t_rxtshft=%d)", tp->t_rxtshift);
-			cp = ", ";
-		}
-		if (*cp != '\t')
-			putchar('\n');
-	}
-#endif
 }
 
 int



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802151826.w1FIQjxk095386>