summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/sysctl.3
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>1999-01-06 18:11:53 +0000
committerdes <des@FreeBSD.org>1999-01-06 18:11:53 +0000
commit76b479177d68eca7d7121427665c08ca7ffaf3b7 (patch)
treeb2891f8ddff12ca4475c2d8de6f517e644f4685b /lib/libc/gen/sysctl.3
parent7bcec4ef4cc90cac63c72a5b732730c0f851c23c (diff)
downloadFreeBSD-src-76b479177d68eca7d7121427665c08ca7ffaf3b7.zip
FreeBSD-src-76b479177d68eca7d7121427665c08ca7ffaf3b7.tar.gz
Make the implementation and documentation agree. Specifically:
- document that sysctl() and sysctlbyname() return 0 on success - if the provided buffer is too small, set errno to ENOMEM and return -1 instead of returning ENOMEM.
Diffstat (limited to 'lib/libc/gen/sysctl.3')
-rw-r--r--lib/libc/gen/sysctl.35
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3
index 30e8e83..02a185c 100644
--- a/lib/libc/gen/sysctl.3
+++ b/lib/libc/gen/sysctl.3
@@ -667,9 +667,10 @@ If the amount of free and cache memory falls below this value, the
pageout daemon will enter "memory conserving mode" to avoid deadlock.
.El
.Sh RETURN VALUES
-If the call to
.Fn sysctl
-is successful, the number of bytes copied out is returned.
+and
+.Fn sysctlbyname
+return 0 when successful.
Otherwise \-1 is returned and
.Va errno
is set appropriately.
OpenPOWER on IntegriCloud