Add a quick description of sysctlbyname() and link sysctl.3 to
sysctlbyname.3
This commit is contained in:
parent
16373facf6
commit
dd1d7d1fa0
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user