From a81bf90a94dda0fbcf898576a22805e48ea7fce6 Mon Sep 17 00:00:00 2001 From: elad Date: Fri, 22 Sep 2006 23:21:52 +0000 Subject: [PATCH] PR/31347: Geoff C. Wing: netstat err message is ambiguous about cause Applied patch, thanks! --- usr.bin/netstat/bpf.c | 4 ++-- usr.bin/netstat/inet.c | 6 +++--- usr.bin/netstat/inet6.c | 6 +++--- usr.bin/netstat/unix.c | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/usr.bin/netstat/bpf.c b/usr.bin/netstat/bpf.c index 17f64bd6063f..f286c43f2b32 100644 --- a/usr.bin/netstat/bpf.c +++ b/usr.bin/netstat/bpf.c @@ -1,4 +1,4 @@ -/* $NetBSD: bpf.c,v 1.5 2005/11/21 22:43:34 rpaulo Exp $ */ +/* $NetBSD: bpf.c,v 1.6 2006/09/22 23:21:52 elad Exp $ */ /* * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -91,7 +91,7 @@ bpf_dump(char *interface) sz = CTL_MAXNAME; if (sysctlnametomib("net.bpf.peers", &name[0], &sz) == -1) - err(1, "sysctlnametomib"); + err(1, "sysctlnametomib: net.bpf.peers"); namelen = sz; name[namelen++] = sizeof(*dpe); diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index c712d6d5b8b2..df4c5a7dda7c 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -1,4 +1,4 @@ -/* $NetBSD: inet.c,v 1.76 2006/09/05 00:29:36 rpaulo Exp $ */ +/* $NetBSD: inet.c,v 1.77 2006/09/22 23:21:52 elad Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "from: @(#)inet.c 8.4 (Berkeley) 4/20/94"; #else -__RCSID("$NetBSD: inet.c,v 1.76 2006/09/05 00:29:36 rpaulo Exp $"); +__RCSID("$NetBSD: inet.c,v 1.77 2006/09/22 23:21:52 elad Exp $"); #endif #endif /* not lint */ @@ -192,7 +192,7 @@ protopr(off, name) /* get dynamic pcblist node */ if (sysctlnametomib(mibname, mib, &namelen) == -1) - err(1, "sysctlnametomib"); + err(1, "sysctlnametomib: %s", mibname); if (sysctl(mib, sizeof(mib) / sizeof(*mib), NULL, &size, NULL, 0) == -1) diff --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c index 8f4447f543df..70d6f15a12e6 100644 --- a/usr.bin/netstat/inet6.c +++ b/usr.bin/netstat/inet6.c @@ -1,4 +1,4 @@ -/* $NetBSD: inet6.c,v 1.39 2006/05/31 13:26:17 rpaulo Exp $ */ +/* $NetBSD: inet6.c,v 1.40 2006/09/22 23:21:52 elad Exp $ */ /* BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp */ /* @@ -64,7 +64,7 @@ #if 0 static char sccsid[] = "@(#)inet.c 8.4 (Berkeley) 4/20/94"; #else -__RCSID("$NetBSD: inet6.c,v 1.39 2006/05/31 13:26:17 rpaulo Exp $"); +__RCSID("$NetBSD: inet6.c,v 1.40 2006/09/22 23:21:52 elad Exp $"); #endif #endif /* not lint */ @@ -252,7 +252,7 @@ ip6protopr(off, name) if (errno == ENOENT) return; - err(1, "sysctlnametomib"); + err(1, "sysctlnametomib: %s", mibname); } if (sysctl(mib, sizeof(mib) / sizeof(*mib), NULL, &size, diff --git a/usr.bin/netstat/unix.c b/usr.bin/netstat/unix.c index c5f3c416220e..3bb85af50dd6 100644 --- a/usr.bin/netstat/unix.c +++ b/usr.bin/netstat/unix.c @@ -1,4 +1,4 @@ -/* $NetBSD: unix.c,v 1.26 2006/05/21 21:01:56 liamjfoy Exp $ */ +/* $NetBSD: unix.c,v 1.27 2006/09/22 23:21:53 elad Exp $ */ /*- * Copyright (c) 1983, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "from: @(#)unix.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: unix.c,v 1.26 2006/05/21 21:01:56 liamjfoy Exp $"); +__RCSID("$NetBSD: unix.c,v 1.27 2006/09/22 23:21:53 elad Exp $"); #endif #endif /* not lint */ @@ -159,7 +159,7 @@ unixpr(off) if (sysctlnametomib(mibname, mib, &namelen) == -1) - err(1, "sysctlnametomib"); + err(1, "sysctlnametomib: %s", mibname); if (sysctl(mib, sizeof(mib) / sizeof(*mib), NULL, &size, NULL, 0) == -1)