summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/sysctl.3
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-07-12 11:16:18 +0000
committerpeter <peter@FreeBSD.org>1997-07-12 11:16:18 +0000
commit2af34ea464056a4ab292d229efc3bd71671727d8 (patch)
tree98208018b9220b15d4821b1ae0fd7de2b59a13b8 /lib/libc/gen/sysctl.3
parente577692d0a1a79344ff02cde137a99d6bf9cab9c (diff)
downloadFreeBSD-src-2af34ea464056a4ab292d229efc3bd71671727d8.zip
FreeBSD-src-2af34ea464056a4ab292d229efc3bd71671727d8.tar.gz
Add a quick description of sysctlbyname() and link sysctl.3 to
sysctlbyname.3
Diffstat (limited to 'lib/libc/gen/sysctl.3')
-rw-r--r--lib/libc/gen/sysctl.312
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3
index df0b4c2..d1fe3b3 100644
--- a/lib/libc/gen/sysctl.3
+++ b/lib/libc/gen/sysctl.3
@@ -35,13 +35,15 @@
.Dt SYSCTL 3
.Os
.Sh NAME
-.Nm sysctl
+.Nm sysctl ,
+.Nm sysctlbyname
.Nd get or set system information
.Sh SYNOPSIS
.Fd #include <sys/types.h>
.Fd #include <sys/sysctl.h>
.Ft int
.Fn sysctl "int *name" "u_int namelen" "void *oldp" "size_t *oldlenp" "void *newp" "size_t newlen"
+.Fn sysctlbyname "const char *name" "void *oldp" "size_t *oldlenp" "void *newp" "size_t newlen"
.Sh DESCRIPTION
The
.Fn sysctl
@@ -71,6 +73,14 @@ which is a
.Fa namelen
length array of integers.
.Pp
+The
+.Fn sysctlbyname
+function accepts an ascii representation of the name and internally
+looks up the integer name vector. Apart from that, it behaves the same
+as the standard
+.Fn sysctl
+function.
+.Pp
The information is copied into the buffer specified by
.Fa oldp .
The size of the buffer is given by the location specified by
OpenPOWER on IntegriCloud