Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jul 2009 16:39:48 GMT
From:      Gabor Pali <pgj@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 165597 for review
Message-ID:  <200907041639.n64GdmMt094199@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=165597

Change 165597 by pgj@petymeg-current on 2009/07/04 16:39:30

	Correct the previous patch about kread(): call it only when
	needed (e.g. for routing statistics)

Affected files ...

.. //depot/projects/soc2009/pgj_libstat/src/usr.bin/netstat/main.c#11 edit

Differences ...

==== //depot/projects/soc2009/pgj_libstat/src/usr.bin/netstat/main.c#11 (text+ko) ====

@@ -523,13 +523,13 @@
 	 * used for the queries, which is slower.
 	 */
 #endif
-	if (!live)
+	if (iflag && !sflag) {
 		kread(0, NULL, 0);
-	if (iflag && !sflag) {
 		intpr(interval, nl[N_IFNET].n_value, NULL);
 		exit(0);
 	}
 	if (rflag) {
+		kread(0, NULL, 0);
 		if (sflag)
 			rt_stats(nl[N_RTSTAT].n_value, nl[N_RTTRASH].n_value);
 		else
@@ -537,6 +537,7 @@
 		exit(0);
 	}
 	if (gflag) {
+		kread(0, NULL, 0);
 		if (sflag) {
 			if (af == AF_INET || af == AF_UNSPEC)
 				mrt_stats(nl[N_MRTSTAT].n_value);



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