summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2013-09-12 20:49:20 +0000
committerjhb <jhb@FreeBSD.org>2013-09-12 20:49:20 +0000
commit9ab3c32d737793575ee89c4106603d456dc63bc2 (patch)
tree734488ed0231e8ce201070b662ca3f7b8092950f /share
parent3c31e1fb755bb2eeb23ed1466712f9163ac3d525 (diff)
downloadFreeBSD-src-9ab3c32d737793575ee89c4106603d456dc63bc2.zip
FreeBSD-src-9ab3c32d737793575ee89c4106603d456dc63bc2.tar.gz
- Document the UQUAD sysctl variants.
- Clarify that exactly one of the "access" flags is required and list the optional flags in a separate list. Prefer bundling CTLFLAG_TUN into the access flag by not documenting it as an optional flag to set. Approved by: re (glebius) MFC after: 1 week
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/Makefile6
-rw-r--r--share/man/man9/sysctl.926
-rw-r--r--share/man/man9/sysctl_add_oid.912
3 files changed, 32 insertions, 12 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index e85c7ad..8ce940f 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -1304,22 +1304,24 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \
sysctl.9 SYSCTL_NODE.9 \
sysctl.9 SYSCTL_OPAQUE.9 \
sysctl.9 SYSCTL_PROC.9 \
+ sysctl.9 SYSCTL_QUAD.9 \
sysctl.9 SYSCTL_STRING.9 \
sysctl.9 SYSCTL_STRUCT.9 \
sysctl.9 SYSCTL_UINT.9 \
sysctl.9 SYSCTL_ULONG.9 \
- sysctl.9 SYSCTL_QUAD.9
+ sysctl.9 SYSCTL_UQUAD.9
MLINKS+=sysctl_add_oid.9 SYSCTL_ADD_INT.9 \
sysctl_add_oid.9 SYSCTL_ADD_LONG.9 \
sysctl_add_oid.9 SYSCTL_ADD_NODE.9 \
sysctl_add_oid.9 SYSCTL_ADD_OID.9 \
sysctl_add_oid.9 SYSCTL_ADD_OPAQUE.9 \
sysctl_add_oid.9 SYSCTL_ADD_PROC.9 \
+ sysctl_add_oid.9 SYSCTL_ADD_QUAD.9 \
sysctl_add_oid.9 SYSCTL_ADD_STRING.9 \
sysctl_add_oid.9 SYSCTL_ADD_STRUCT.9 \
sysctl_add_oid.9 SYSCTL_ADD_UINT.9 \
sysctl_add_oid.9 SYSCTL_ADD_ULONG.9 \
- sysctl_add_oid.9 SYSCTL_ADD_QUAD.9 \
+ sysctl_add_oid.9 SYSCTL_ADD_UQUAD.9 \
sysctl_add_oid.9 SYSCTL_CHILDREN.9 \
sysctl_add_oid.9 sysctl_move_oid.9 \
sysctl_add_oid.9 sysctl_remove_oid.9 \
diff --git a/share/man/man9/sysctl.9 b/share/man/man9/sysctl.9
index 5399b56..b9a9fe5 100644
--- a/share/man/man9/sysctl.9
+++ b/share/man/man9/sysctl.9
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd January 16, 2010
+.Dd September 12, 2013
.Dt SYSCTL 9
.Os
.Sh NAME
@@ -35,11 +35,12 @@
.Nm SYSCTL_NODE ,
.Nm SYSCTL_OPAQUE ,
.Nm SYSCTL_PROC ,
+.Nm SYSCTL_QUAD ,
.Nm SYSCTL_STRING ,
.Nm SYSCTL_STRUCT ,
.Nm SYSCTL_UINT ,
.Nm SYSCTL_ULONG ,
-.Nm SYSCTL_QUAD
+.Nm SYSCTL_UQUAD
.Nd Static sysctl declaration functions
.Sh SYNOPSIS
.In sys/types.h
@@ -50,11 +51,12 @@
.Fn SYSCTL_NODE parent nbr name access handler descr
.Fn SYSCTL_OPAQUE parent nbr name access ptr len fmt descr
.Fn SYSCTL_PROC parent nbr name access ptr arg handler fmt descr
+.Fn SYSCTL_QUAD parent nbr name access ptr val descr
.Fn SYSCTL_STRING parent nbr name access arg len descr
.Fn SYSCTL_STRUCT parent nbr name access ptr type descr
.Fn SYSCTL_UINT parent nbr name access ptr val descr
.Fn SYSCTL_ULONG parent nbr name access ptr val descr
-.Fn SYSCTL_QUAD parent nbr name access ptr val descr
+.Fn SYSCTL_UQUAD parent nbr name access ptr val descr
.Sh DESCRIPTION
The
.Nm SYSCTL
@@ -76,12 +78,13 @@ New nodes are declared using one of
.Fn SYSCTL_NODE ,
.Fn SYSCTL_OPAQUE ,
.Fn SYSCTL_PROC ,
+.Fn SYSCTL_QUAD ,
.Fn SYSCTL_STRING ,
.Fn SYSCTL_STRUCT ,
.Fn SYSCTL_UINT ,
.Fn SYSCTL_ULONG ,
and
-.Fn SYSCTL_QUAD .
+.Fn SYSCTL_UQUAD .
Each macro accepts a parent name, as declared using
.Fn SYSCTL_DECL ,
an OID number, typically
@@ -118,15 +121,23 @@ This is an unsigned long.
This is a 64-bit unsigned integer.
.El
.Pp
-All sysctl types except for new node declarations require one or more flags
-to be set indicating the read and write disposition of the sysctl:
+All sysctl types except for new node declarations require one of the following
+flags to be set indicating the read and write disposition of the sysctl:
.Bl -tag -width ".Dv CTLFLAG_ANYBODY"
.It Dv CTLFLAG_RD
This is a read-only sysctl.
+.It Dv CTLFLAG_RDTUN
+This is a read-only sysctl which can be set by a system tunable.
.It Dv CTLFLAG_WR
This is a writable sysctl.
.It Dv CTLFLAG_RW
This sysctl is readable and writable.
+.It Dv CTLFLAG_RWTUN
+This sysctl is readable and writable and can also be set by a system tunable.
+.El
+.Pp
+Additionally, any of the following optional flags may also be specified:
+.Bl -tag -width ".Dv CTLFLAG_ANYBODY"
.It Dv CTLFLAG_ANYBODY
Any user or process can write to this sysctl.
.It Dv CTLFLAG_SECURE
@@ -139,9 +150,6 @@ This sysctl can be written to by processes in
When iterating the sysctl name space, do not list this sysctl.
.It Dv CTLFLAG_TUN
Advisory flag that a system tunable also exists for this variable.
-.It Dv CTLFLAG_RDTUN
-Advisory flag that a system tunable also exists for this variable;
-however, the run-time variable is read-only.
.El
.Pp
When creating new sysctls, careful attention should be paid to the security
diff --git a/share/man/man9/sysctl_add_oid.9 b/share/man/man9/sysctl_add_oid.9
index 74e76d7..bffc6db 100644
--- a/share/man/man9/sysctl_add_oid.9
+++ b/share/man/man9/sysctl_add_oid.9
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 15, 2000
+.Dd September 12, 2013
.Dt SYSCTL_ADD_OID 9
.Os
.Sh NAME
@@ -157,6 +157,16 @@
.Fa "const char *descr"
.Fc
.Ft struct sysctl_oid *
+.Fo SYSCTL_ADD_UQUAD
+.Fa "struct sysctl_ctx_list *ctx"
+.Fa "struct sysctl_oid_list *parent"
+.Fa "int number"
+.Fa "const char *name"
+.Fa "int access"
+.Fa "uint64_t *arg"
+.Fa "const char *descr"
+.Fc
+.Ft struct sysctl_oid *
.Fo SYSCTL_ADD_OPAQUE
.Fa "struct sysctl_ctx_list *ctx"
.Fa "struct sysctl_oid_list *parent"
OpenPOWER on IntegriCloud