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).
This commit is contained in:
atatat 2004-04-09 18:48:05 +00:00
parent 84c1ac8b80
commit e9814619fb
1 changed files with 3 additions and 3 deletions

View File

@ -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 @@ dump_drain:
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;