From: David van Moolenbroek Date: Fri, 24 Jul 2015 17:16:29 +0000 (+0000) Subject: libc: fix sysctl(3) error code X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=refs%2Fchanges%2F35%2F3035%2F1;p=minix.git libc: fix sysctl(3) error code All unimplemented sysctl calls would return 2 instead of -1. Change-Id: Ib486a03dc93969e646e4e11d890dc46855d790c4 --- diff --git a/lib/libc/gen/sysctl.c b/lib/libc/gen/sysctl.c index 66318145d..23d492deb 100644 --- a/lib/libc/gen/sysctl.c +++ b/lib/libc/gen/sysctl.c @@ -74,7 +74,8 @@ int __sysctl(const int *name, unsigned int namelen, void *oldp, size_t *oldlenp, const void *newp, size_t newlen) { - return ENOENT; + errno = ENOENT; + return -1; } #endif /* defined(__minix) */