summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2014-08-28 04:35:38 +0000
committerhselasky <hselasky@FreeBSD.org>2014-08-28 04:35:38 +0000
commitc96a03670809c3475989e0c44baeda3424533696 (patch)
treee07611c97a7343e7f534b97380805154078c3c9c /share
parent1f80c8d7252e15fa53dfde2bf0c7229cbd0a24bb (diff)
downloadFreeBSD-src-c96a03670809c3475989e0c44baeda3424533696.zip
FreeBSD-src-c96a03670809c3475989e0c44baeda3424533696.tar.gz
Add description of "sysctl_remove_name()" function.
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/Makefile3
-rw-r--r--share/man/man9/sysctl_add_oid.932
2 files changed, 31 insertions, 4 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index 1966f02..b6fcb80 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -1379,7 +1379,8 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \
sysctl.9 SYSCTL_ULONG.9 \
sysctl.9 SYSCTL_UQUAD.9
MLINKS+=sysctl_add_oid.9 sysctl_move_oid.9 \
- sysctl_add_oid.9 sysctl_remove_oid.9
+ sysctl_add_oid.9 sysctl_remove_oid.9 \
+ sysctl_add_oid.9 sysctl_remove_name.9
MLINKS+=sysctl_ctx_init.9 sysctl_ctx_entry_add.9 \
sysctl_ctx_init.9 sysctl_ctx_entry_del.9 \
sysctl_ctx_init.9 sysctl_ctx_entry_find.9 \
diff --git a/share/man/man9/sysctl_add_oid.9 b/share/man/man9/sysctl_add_oid.9
index 9195f0b..e2c75e8 100644
--- a/share/man/man9/sysctl_add_oid.9
+++ b/share/man/man9/sysctl_add_oid.9
@@ -27,13 +27,14 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 31, 2014
+.Dd August 28, 2014
.Dt SYSCTL_ADD_OID 9
.Os
.Sh NAME
.Nm sysctl_add_oid ,
.Nm sysctl_move_oid ,
-.Nm sysctl_remove_oid
+.Nm sysctl_remove_oid ,
+.Nm sysctl_remove_name
.Nd runtime sysctl tree manipulation
.Sh SYNOPSIS
.In sys/types.h
@@ -62,6 +63,13 @@
.Fa "int del"
.Fa "int recurse"
.Fc
+.Ft int
+.Fo sysctl_remove_name
+.Fa "struct sysctl_oid *oidp"
+.Fa "const char *name"
+.Fa "int del"
+.Fa "int recurse"
+.Fc
.Sh DESCRIPTION
These functions provide the interface for creating and deleting sysctl
OIDs at runtime for example during the lifetime of a module.
@@ -149,7 +157,25 @@ Be aware, though, that this may result in a system
if other code sections continue to use removed subtrees.
.El
.Pp
-Again, in most cases the programmer should use contexts,
+The
+.Fn sysctl_remove_name
+function looks up the child node matching the
+.Fa name
+argument and then invokes the
+.Fn sysctl_remove_oid
+function on that node, passing along the
+.Fa del
+and
+.Fa recurse
+arguments.
+If a node having the specified name does not exist an error code of
+.Er ENOENT
+is returned.
+Else the error code from
+.Fn sysctl_remove_oid
+is returned.
+.Pp
+In most cases the programmer should use contexts,
as described in
.Xr sysctl_ctx_init 9 ,
to keep track of created OIDs,
OpenPOWER on IntegriCloud