diff options
author | peter <peter@FreeBSD.org> | 1997-07-12 11:16:18 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1997-07-12 11:16:18 +0000 |
commit | 2af34ea464056a4ab292d229efc3bd71671727d8 (patch) | |
tree | 98208018b9220b15d4821b1ae0fd7de2b59a13b8 /lib/libc | |
parent | e577692d0a1a79344ff02cde137a99d6bf9cab9c (diff) | |
download | FreeBSD-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')
-rw-r--r-- | lib/libc/gen/Makefile.inc | 3 | ||||
-rw-r--r-- | lib/libc/gen/sysctl.3 | 12 |
2 files changed, 13 insertions, 2 deletions
diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index 59ffcbb..11e87c5 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -1,5 +1,5 @@ # @(#)Makefile.inc 8.6 (Berkeley) 5/4/95 -# $Id: Makefile.inc,v 1.35 1997/06/14 01:15:41 ache Exp $ +# $Id: Makefile.inc,v 1.36 1997/06/25 08:05:02 msmith Exp $ # machine-independent gen sources .PATH: ${.CURDIR}/../libc/${MACHINE}/gen ${.CURDIR}/../libc/gen @@ -114,6 +114,7 @@ MLINKS+=setmode.3 getmode.3 MLINKS+=sigsetops.3 sigemptyset.3 sigsetops.3 sigfillset.3 \ sigsetops.3 sigaddset.3 sigsetops.3 sigdelset.3 \ sigsetops.3 sigismember.3 +MLINKS+=sysctl.3 sysctlbyname.3 MLINKS+=syslog.3 closelog.3 syslog.3 openlog.3 syslog.3 setlogmask.3 \ syslog.3 vsyslog.3 MLINKS+=tcsendbreak.3 tcdrain.3 tcsendbreak.3 tcflush.3 tcsendbreak.3 tcflow.3 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 |