summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2004-03-12 11:22:50 +0000
committerdes <des@FreeBSD.org>2004-03-12 11:22:50 +0000
commit08e8eb2b40c0e5b6b1d511c0a68bd174602757b5 (patch)
tree8261e4efc65aec41809c3bf3c5a2dde61fc7c759 /usr.bin
parentd9e00be05baeffe1109f665d6bbb8309a3ae2ed0 (diff)
downloadFreeBSD-src-08e8eb2b40c0e5b6b1d511c0a68bd174602757b5.zip
FreeBSD-src-08e8eb2b40c0e5b6b1d511c0a68bd174602757b5.tar.gz
Do not print a warning about net.inet.pim.stats if errno is
ENOENT, because that means we do not have PIM in the kernel. Submitted by: hmp MFC after: 1 week
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/netstat/inet.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c
index 80d3e4d..cf252f3 100644
--- a/usr.bin/netstat/inet.c
+++ b/usr.bin/netstat/inet.c
@@ -719,7 +719,8 @@ pim_stats(u_long off __unused, const char *name, int af1 __unused)
memset(&zerostat, 0, len);
if (sysctlbyname("net.inet.pim.stats", &pimstat, &len,
zflag ? &zerostat : NULL, zflag ? len : 0) < 0) {
- warn("sysctl: net.inet.pim.stats");
+ if (errno != ENOENT)
+ warn("sysctl: net.inet.pim.stats");
return;
}
OpenPOWER on IntegriCloud