From 6d7c0d2fed07dcdc325a41cd53299c4e8e6906fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Fri, 12 Mar 2004 11:22:50 +0000 Subject: [PATCH] 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 --- usr.bin/netstat/inet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index 80d3e4db49f..cf252f39315 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; }