diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2007-07-16 17:15:55 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2007-07-16 17:15:55 +0000 |
| commit | feda1a4372d5e340da97042375dfb783dea52eda (patch) | |
| tree | 165174828db97bceab2299030940226f1b6620cf /usr.bin/netstat/netgraph.c | |
| parent | 72d73315396520151f86f8c6cb42b09d5a1073e5 (diff) | |
Notes
Diffstat (limited to 'usr.bin/netstat/netgraph.c')
| -rw-r--r-- | usr.bin/netstat/netgraph.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/netstat/netgraph.c b/usr.bin/netstat/netgraph.c index 77db23f35d53..8ca9e5cd7e31 100644 --- a/usr.bin/netstat/netgraph.c +++ b/usr.bin/netstat/netgraph.c @@ -62,7 +62,8 @@ static int first = 1; static int csock = -1; void -netgraphprotopr(u_long off, const char *name, int af1 __unused) +netgraphprotopr(u_long off, const char *name, int af1 __unused, + int proto __unused) { struct ngpcb *this, *next; struct ngpcb ngpcb; @@ -81,6 +82,10 @@ netgraphprotopr(u_long off, const char *name, int af1 __unused) struct kld_file_stat ks; int fileid; + /* Can't do this for core dumps. */ + if (!live) + return; + /* See if module is loaded */ if ((fileid = kldfind(modname)) < 0) { if (debug) |
