svn commit: r233866 - projects/pf/head/usr.bin/netstat

Gleb Smirnoff glebius at
Wed Apr 4 08:47:37 UTC 2012

Author: glebius
Date: Wed Apr  4 08:47:36 2012
New Revision: 233866

  In pfsync stats print last couple of lines in a plural form optionally.
  > Description of fields to fill in above:                     76 columns --|
  > PR:            If a GNATS PR is affected by the change.
  > Submitted by:  If someone else sent in the change.
  > Reviewed by:   If someone else reviewed your modification.
  > Approved by:   If you needed approval for this commit.
  > Obtained from: If the change is from a third party.
  > MFC after:     N [day[s]|week[s]|month[s]].  Request a reminder email.
  > Security:      Vulnerability reference (one per line) or description.
  > Empty fields above will be automatically removed.
  M    netstat/if.c


Modified: projects/pf/head/usr.bin/netstat/if.c
--- projects/pf/head/usr.bin/netstat/if.c	Wed Apr  4 08:39:55 2012	(r233865)
+++ projects/pf/head/usr.bin/netstat/if.c	Wed Apr  4 08:47:36 2012	(r233866)
@@ -106,8 +106,6 @@ pfsync_stats(u_long off, const char *nam
 #define	p(f, m) if (pfsyncstat.f || sflag <= 1) \
 	printf(m, (uintmax_t)pfsyncstat.f, plural(pfsyncstat.f))
-#define	p2(f, m) if (pfsyncstat.f || sflag <= 1) \
-	printf(m, (uintmax_t)pfsyncstat.f)
 	p(pfsyncs_ipackets, "\t%ju packet%s received (IPv4)\n");
 	p(pfsyncs_ipackets6, "\t%ju packet%s received (IPv6)\n");
@@ -123,8 +121,8 @@ pfsync_stats(u_long off, const char *nam
 	p(pfsyncs_badstate, "\t\t%ju failed state lookup/insert%s\n");
 	p(pfsyncs_opackets, "\t%ju packet%s sent (IPv4)\n");
 	p(pfsyncs_opackets6, "\t%ju packet%s sent (IPv6)\n");
-	p2(pfsyncs_onomem, "\t\t%ju send failed due to mbuf memory error\n");
-	p2(pfsyncs_oerrors, "\t\t%ju send error\n");
+	p(pfsyncs_onomem, "\t\t%ju failure%s due to mbuf memory error\n");
+	p(pfsyncs_oerrors, "\t\t%ju send error%s\n");
 #undef p
 #undef p2

More information about the svn-src-projects mailing list