Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/netstat sysctl(3) no longer returns ENOPROTOOPT in t...



details:   https://anonhg.NetBSD.org/src/rev/4d59aa4535a9
branches:  trunk
changeset: 565459:4d59aa4535a9
user:      atatat <atatat%NetBSD.org@localhost>
date:      Fri Apr 09 18:48:05 2004 +0000

description:
sysctl(3) no longer returns ENOPROTOOPT in this case, but ENOENT,
which is a more generic "that's not in the tree" response.

ENOPROTOOPT was specific to the net subtree under the old framework,
and didn't add much value (other than letting the caller know they
were looking up something under the net subtree, which they presumably
ought to have known already).

diffstat:

 usr.bin/netstat/mbuf.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r d92310c8311c -r 4d59aa4535a9 usr.bin/netstat/mbuf.c
--- a/usr.bin/netstat/mbuf.c    Fri Apr 09 18:36:08 2004 +0000
+++ b/usr.bin/netstat/mbuf.c    Fri Apr 09 18:48:05 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mbuf.c,v 1.22 2003/10/18 12:26:26 enami Exp $  */
+/*     $NetBSD: mbuf.c,v 1.23 2004/04/09 18:48:05 atatat Exp $ */
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "from: @(#)mbuf.c       8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: mbuf.c,v 1.22 2003/10/18 12:26:26 enami Exp $");
+__RCSID("$NetBSD: mbuf.c,v 1.23 2004/04/09 18:48:05 atatat Exp $");
 #endif
 #endif /* not lint */
 
@@ -205,7 +205,7 @@
 
        if (sysctl(mowners_ctl, sizeof(mowners_ctl)/sizeof(mowners_ctl[0]),
                    NULL, &len, NULL, 0) < 0) {
-               if (errno == ENOPROTOOPT)
+               if (errno == ENOENT)
                        return;
                warn("mowners: sysctl test");
                return;



Home | Main Index | Thread Index | Old Index