Author: melifaro Date: Wed Dec 18 20:04:04 2013 New Revision: 259566 URL: http://svnweb.freebsd.org/changeset/base/259566
Log: Restore corefiles handling via kvm(3). Found by: John-Mark Gurney <jmg at funkthat.com> MFC after: 4 weeks Modified: head/usr.bin/netstat/main.c head/usr.bin/netstat/netstat.h head/usr.bin/netstat/route.c Modified: head/usr.bin/netstat/main.c ============================================================================== --- head/usr.bin/netstat/main.c Wed Dec 18 19:25:40 2013 (r259565) +++ head/usr.bin/netstat/main.c Wed Dec 18 20:04:04 2013 (r259566) @@ -319,6 +319,7 @@ int gflag; /* show group (multicast) ro int hflag; /* show counters in human readable format */ int iflag; /* show interfaces */ int Lflag; /* show size of listen queues */ +int Mflag; /* read statistics from core */ int mflag; /* show memory stats */ int noutputs = 0; /* how much outputs before we exit */ int numeric_addr; /* show addresses numerically */ @@ -424,6 +425,7 @@ main(int argc, char *argv[]) Lflag = 1; break; case 'M': + Mflag = 1; memf = optarg; break; case 'm': Modified: head/usr.bin/netstat/netstat.h ============================================================================== --- head/usr.bin/netstat/netstat.h Wed Dec 18 19:25:40 2013 (r259565) +++ head/usr.bin/netstat/netstat.h Wed Dec 18 20:04:04 2013 (r259566) @@ -40,6 +40,7 @@ extern int gflag; /* show group (multica extern int hflag; /* show counters in human readable format */ extern int iflag; /* show interfaces */ extern int Lflag; /* show size of listen queues */ +extern int Mflag; /* read statistics from core */ extern int mflag; /* show memory stats */ extern int noutputs; /* how much outputs before we exit */ extern int numeric_addr; /* show addresses numerically */ Modified: head/usr.bin/netstat/route.c ============================================================================== --- head/usr.bin/netstat/route.c Wed Dec 18 19:25:40 2013 (r259565) +++ head/usr.bin/netstat/route.c Wed Dec 18 20:04:04 2013 (r259566) @@ -182,7 +182,7 @@ routepr(u_long rtree, int fibnum) printf(" (fib: %d)", fibnum); printf("\n"); - if (Aflag == 0 && NewTree) + if (Aflag == 0 && Mflag == 0 && NewTree) ntreestuff(fibnum, af); else { if (rtree == 0) { _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"