PERFORCE change 165597 for review
Gabor Pali
pgj at FreeBSD.org
Sat Jul 4 16:39:50 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=165597
Change 165597 by pgj at 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);
More information about the p4-projects
mailing list