Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Aug 2014 04:35:38 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r270740 - head/share/man/man9
Message-ID:  <201408280435.s7S4Zcs8099599@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Thu Aug 28 04:35:38 2014
New Revision: 270740
URL: http://svnweb.freebsd.org/changeset/base/270740

Log:
  Add description of "sysctl_remove_name()" function.

Modified:
  head/share/man/man9/Makefile
  head/share/man/man9/sysctl_add_oid.9

Modified: head/share/man/man9/Makefile
==============================================================================
--- head/share/man/man9/Makefile	Thu Aug 28 04:20:24 2014	(r270739)
+++ head/share/man/man9/Makefile	Thu Aug 28 04:35:38 2014	(r270740)
@@ -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 \

Modified: head/share/man/man9/sysctl_add_oid.9
==============================================================================
--- head/share/man/man9/sysctl_add_oid.9	Thu Aug 28 04:20:24 2014	(r270739)
+++ head/share/man/man9/sysctl_add_oid.9	Thu Aug 28 04:35:38 2014	(r270740)
@@ -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 i
 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,



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