Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Feb 2019 15:03:50 +0000 (UTC)
From:      Mateusz Piotrowski <0mp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r344518 - head/share/man/man9
Message-ID:  <201902251503.x1PF3otL011409@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: 0mp (ports committer)
Date: Mon Feb 25 15:03:50 2019
New Revision: 344518
URL: https://svnweb.freebsd.org/changeset/base/344518

Log:
  Add missing types to the sysctl(9) manual page
  
  Update the diff to include other missing sysctl types found in sysctl.h.
  
  Some of these sysctls are already documented in other pages (e.g counter(9)
  and ZONE(9)), but they should at least be mentioned here for completeness.
  
  This patch now documents all of the following:
  - SYSCTL_BOOL/SYSCTL_ADD_BOOL
  - SYSCTL_COUNTER_U64/SYSCTL_ADD_COUNTER_U64
  - SYSCTL_COUNTER_U64_ARRAY/SYSCTL_ADD_COUNTER_U64_ARRAY
  - SYSCTL_SBINTIME_MSEC/SYSCTL_ADD_SBINTIME_MSEC
  - SYSCTL_SBINTIME_USEC/SYSCTL_ADD_SBINTIME_USEC
  - SYSCTL_UMA_CUR/SYSCTL_ADD_UMA_CUR
  - SYSCTL_UMA_MAX/SYSCTL_ADD_UMA_MAX
  
  Submitted by:	mhorne063_gmail.com
  Reviewed by:	bcr, hselasky
  Approved by:	bcr (doc), hselasky (src)
  Approved by:	krion (mentor, implicit), mat (mentor, implicit)
  Differential Revision:	https://reviews.freebsd.org/D19272

Modified:
  head/share/man/man9/sysctl.9

Modified: head/share/man/man9/sysctl.9
==============================================================================
--- head/share/man/man9/sysctl.9	Mon Feb 25 13:15:34 2019	(r344517)
+++ head/share/man/man9/sysctl.9	Mon Feb 25 15:03:50 2019	(r344518)
@@ -25,11 +25,14 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 1, 2018
+.Dd February 25, 2019
 .Dt SYSCTL 9
 .Os
 .Sh NAME
 .Nm SY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CTL_UMA_CUR ,
+.Nm SYSCTL_UMA_MAX
 .Nd Dynamic and static sysctl MIB creation functions
 .Sh SYNOPSIS
 .In sys/param.h
 .In sys/sysctl.h
 .Fn SYSCTL_DECL name
 .Ft struct sysctl_oid *
+.Fo SYSCTL_ADD_BOOL
+.Fa "struct sysctl_ctx_list *ctx"
+.Fa "struct sysctl_oid_list *parent"
+.Fa "int number"
+.Fa "const char *name"
+.Fa "int ctlflags"
+.Fa "bool *ptr"
+.Fa "uint8_t val"
+.Fa "const char *descr"
+.Fc
+.Ft struct sysctl_oid *
+.Fo SYSCTL_ADD_COUNTER_U64
+.Fa "struct sysctl_ctx_list *ctx"
+.Fa "struct sysctl_oid_list *parent"
+.Fa "int number"
+.Fa "const char *name"
+.Fa "int ctlflags"
+.Fa "counter_u64_t *ptr"
+.Fa "const char *descr"
+.Fc
+.Ft struct sysctl_oid *
+.Fo SYSCTL_ADD_COUNTER_U64_ARRAY
+.Fa "struct sysctl_ctx_list *ctx"
+.Fa "struct sysctl_oid_list *parent"
+.Fa "int number"
+.Fa "const char *name"
+.Fa "int ctlflags"
+.Fa "counter_u64_t *ptr"
+.Fa "intmax_t len"
+.Fa "const char *descr"
+.Fc
+.Ft struct sysctl_oid *
 .Fo SYSCTL_ADD_INT
 .Fa "struct sysctl_ctx_list *ctx"
 .Fa "struct sysctl_oid_list *parent"
@@ -214,6 +260,26 @@
 .Fa "const char *descr"
 .Fc
 .Ft struct sysctl_oid *
+.Fo SYSCTL_ADD_SBINTIME_MSEC
+.Fa "struct sysctl_ctx_list *ctx"
+.Fa "struct sysctl_oid_list *parent"
+.Fa "int number"
+.Fa "const char *name"
+.Fa "int ctlflags"
+.Fa "sbintime_t *ptr"
+.Fa "const char *descr"
+.Fc
+.Ft struct sysctl_oid *
+.Fo SYSCTL_ADD_SBINTIME_USEC
+.Fa "struct sysctl_ctx_list *ctx"
+.Fa "struct sysctl_oid_list *parent"
+.Fa "int number"
+.Fa "const char *name"
+.Fa "int ctlflags"
+.Fa "sbintime_t *ptr"
+.Fa "const char *descr"
+.Fc
+.Ft struct sysctl_oid *
 .Fo SYSCTL_ADD_STRING
 .Fa "struct sysctl_ctx_list *ctx"
 .Fa "struct sysctl_oid_list *parent"
@@ -311,6 +377,27 @@
 .Fa "const char *descr"
 .Fc
 .Ft struct sysctl_oid *
+.Fo SYSCTL_ADD_UMA_CUR
+.Fa "struct sysctl_ctx_list *ctx"
+.Fa "struct sysctl_oid_list *parent"
+.Fa "int number"
+.Fa "const char *name"
+.Fa "int ctlflags"
+.Fa "uma_zone_t ptr"
+.Fa "const char *descr"
+.Fc
+.Ft struct sysctl_oid *
+.Fo SYSCTL_ADD_UMA_MAX
+.Fa "struct sysctl_ctx_list *ctx"
+.Fa "struct sysctl_oid_list *parent"
+.Fa "int number"
+.Fa "const char *name"
+.Fa "int ctlflags"
+.Fa "uma_zone_t ptr"
+.Fa "const char *descr"
+.Fc
+.Fa "const char *descr"
+.Ft struct sysctl_oid *
 .Fo SYSCTL_ADD_UAUTO
 .Fa "struct sysctl_ctx_list *ctx"
 .Fa "struct sysctl_oid_list *parent"
@@ -337,6 +424,9 @@
 .Fo SYSCTL_PARENT
 .Fa "struct sysctl_oid *oid"
 .Fc
+.Fn SYSCTL_BOOL parent number name ctlflags ptr val descr
+.Fn SYSCTL_COUNTER_U64 parent number name ctlflags ptr descr
+.Fn SYSCTL_COUNTER_U64_ARRAY parent number name ctlflags ptr len descr
 .Fn SYSCTL_INT parent number name ctlflags ptr val descr
 .Fn SYSCTL_INT_WITH_LABEL parent number name ctlflags ptr val descr label
 .Fn SYSCTL_LONG parent number name ctlflags ptr val descr
@@ -350,6 +440,8 @@
 .Fn SYSCTL_S16 parent number name ctlflags ptr val descr
 .Fn SYSCTL_S32 parent number name ctlflags ptr val descr
 .Fn SYSCTL_S64 parent number name ctlflags ptr val descr
+.Fn SYSCTL_SBINTIME_MSEC parent number name ctlflags ptr descr
+.Fn SYSCTL_SBINTIME_USEC parent number name ctlflags ptr descr
 .Fn SYSCTL_STRING parent number name ctlflags arg len descr
 .Fn SYSCTL_STRUCT parent number name ctlflags ptr struct_type descr
 .Fn SYSCTL_U8 parent number name ctlflags ptr val descr
@@ -359,6 +451,8 @@
 .Fn SYSCTL_UINT parent number name ctlflags ptr val descr
 .Fn SYSCTL_ULONG parent number name ctlflags ptr val descr
 .Fn SYSCTL_UQUAD parent number name ctlflags ptr val descr
+.Fn SYSCTL_UMA_MAX parent number name ctlflags ptr descr
+.Fn SYSCTL_UMA_CUR parent number name ctlflags ptr descr
 .Sh DESCRIPTION
 The
 .Nm SYSCTL
@@ -416,6 +510,7 @@ argument.
 For string type OIDs a length of zero means that
 .Xr strlen 3
 will be used to get the length of the string at each access to the OID.
+For array type OIDs the length must be greater than zero.
 .It Fa ptr
 Pointer to sysctl variable or string data.
 For sysctl values the pointer can be SYSCTL_NULL_XXX_PTR which means the OID is read-only and the returned value should be taken from the
@@ -544,6 +639,9 @@ This OID type is especially useful if the kernel data 
 accessible, or needs to be processed before exporting.
 .Sh CREATING A STATIC SYSCTL
 Static sysctls are declared using one of the
+.Fn SYSCTL_BOOL ,
+.Fn SYSCTL_COUNTER_U64 ,
+.Fn SYSCTL_COUNTER_U64_ARRAY ,
 .Fn SYSCTL_INT ,
 .Fn SYSCTL_INT_WITH_LABEL ,
 .Fn SYSCTL_LONG ,
@@ -557,6 +655,8 @@ Static sysctls are declared using one of the
 .Fn SYSCTL_S16 ,
 .Fn SYSCTL_S32 ,
 .Fn SYSCTL_S64 ,
+.Fn SYSCTL_SBINTIME_MSEC ,
+.Fn SYSCTL_SBINTIME_USEC ,
 .Fn SYSCTL_STRING ,
 .Fn SYSCTL_STRUCT ,
 .Fn SYSCTL_U8 ,
@@ -564,12 +664,17 @@ Static sysctls are declared using one of the
 .Fn SYSCTL_U32 ,
 .Fn SYSCTL_U64 ,
 .Fn SYSCTL_UINT ,
-.Fn SYSCTL_ULONG
+.Fn SYSCTL_ULONG ,
+.Fn SYSCTL_UQUAD ,
+.Fn SYSCTL_UMA_CUR
 or
-.Fn SYSCTL_UQUAD
+.Fn SYSCTL_UMA_MAX
 macros.
 .Sh CREATING A DYNAMIC SYSCTL
 Dynamic nodes are created using one of the
+.Fn SYSCTL_ADD_BOOL ,
+.Fn SYSCTL_ADD_COUNTER_U64 ,
+.Fn SYSCTL_ADD_COUNTER_U64_ARRAY ,
 .Fn SYSCTL_ADD_INT ,
 .Fn SYSCTL_ADD_LONG ,
 .Fn SYSCTL_ADD_NODE ,
@@ -582,6 +687,8 @@ Dynamic nodes are created using one of the
 .Fn SYSCTL_ADD_S16 ,
 .Fn SYSCTL_ADD_S32 ,
 .Fn SYSCTL_ADD_S64 ,
+.Fn SYSCTL_ADD_SBINTIME_MSEC ,
+.Fn SYSCTL_ADD_SBINTIME_USEC ,
 .Fn SYSCTL_ADD_STRING ,
 .Fn SYSCTL_ADD_STRUCT ,
 .Fn SYSCTL_ADD_U8 ,
@@ -591,8 +698,10 @@ Dynamic nodes are created using one of the
 .Fn SYSCTL_ADD_UAUTO ,
 .Fn SYSCTL_ADD_UINT ,
 .Fn SYSCTL_ADD_ULONG ,
+.Fn SYSCTL_ADD_UQUAD ,
+.Fn SYSCTL_ADD_UMA_CUR
 or
-.Fn SYSCTL_UQUAD
+.Fn SYSCTL_ADD_UMA_MAX
 functions.
 See
 .Xr sysctl_remove_oid 9



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902251503.x1PF3otL011409>