aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_sysctl.c
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2013-08-09 01:04:44 +0000
committerScott Long <scottl@FreeBSD.org>2013-08-09 01:04:44 +0000
commitf510415d848d6d4779e11149e4301b51994285ce (patch)
treef2d382eee3ec5ab86e7904346b82cffb986c684e /sys/kern/kern_sysctl.c
parent43667c1f68a54305c13175af0ce1d34bce61566d (diff)
downloadsrc-f510415d848d6d4779e11149e4301b51994285ce.tar.gz
src-f510415d848d6d4779e11149e4301b51994285ce.zip
Add a helpful message that can help point to why a sysctl tree removal failed
Obtained from: Netflix MFC after: 3 days
Notes
Notes: svn path=/head/; revision=254115
Diffstat (limited to 'sys/kern/kern_sysctl.c')
-rw-r--r--sys/kern/kern_sysctl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index 68bf453f8c1e..416f85f9b012 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -412,8 +412,12 @@ sysctl_remove_oid_locked(struct sysctl_oid *oidp, int del, int recurse)
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)