Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Aug 2013 01:04:45 +0000 (UTC)
From:      Scott Long <scottl@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r254115 - head/sys/kern
Message-ID:  <201308090104.r7914jPm046164@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: scottl
Date: Fri Aug  9 01:04:44 2013
New Revision: 254115
URL: http://svnweb.freebsd.org/changeset/base/254115

Log:
  Add a helpful message that can help point to why a sysctl tree removal failed
  
  Obtained from:	Netflix
  MFC after:	3 days

Modified:
  head/sys/kern/kern_sysctl.c

Modified: head/sys/kern/kern_sysctl.c
==============================================================================
--- head/sys/kern/kern_sysctl.c	Fri Aug  9 00:39:20 2013	(r254114)
+++ head/sys/kern/kern_sysctl.c	Fri Aug  9 01:04:44 2013	(r254115)
@@ -412,8 +412,12 @@ sysctl_remove_oid_locked(struct sysctl_o
 		if (oidp->oid_refcnt == 1) {
 			SLIST_FOREACH_SAFE(p,
 			    SYSCTL_CHILDREN(oidp), oid_link, tmp) {
-				if (!recurse)
+				if (!recurse) {
+					printf("Warning: failed attempt to "
+					    "remove oid %s with child %s\n",
+					    oidp->oid_name, p->oid_name);
 					return (ENOTEMPTY);
+				}
 				error = sysctl_remove_oid_locked(p, del,
 				    recurse);
 				if (error)



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