diff options
| author | Peter Wemm <peter@FreeBSD.org> | 1997-07-12 11:16:18 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 1997-07-12 11:16:18 +0000 |
| commit | dd1d7d1fa0c71ed0f084564f12c836406c46d30a (patch) | |
| tree | 9dc874b8e747b6fb3a851ef1034d77cf48b14bd4 /lib/libc | |
| parent | 16373facf68ec1e5026a3fae1deb3e818e5db3a3 (diff) | |
Notes
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 59ffcbbcfc64..11e87c5563db 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 df0b4c2e700b..d1fe3b3d1152 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 |
