From owner-svn-src-head@FreeBSD.ORG Thu Aug 28 04:35:39 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86AD5788; Thu, 28 Aug 2014 04:35:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5874F1B6A; Thu, 28 Aug 2014 04:35:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7S4ZdnV099601; Thu, 28 Aug 2014 04:35:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7S4Zcs8099599; Thu, 28 Aug 2014 04:35:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201408280435.s7S4Zcs8099599@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 28 Aug 2014 04:35:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270740 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2014 04:35:39 -0000 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,