svn commit: r315699 - head/sys/kern
Ngie Cooper
ngie at FreeBSD.org
Wed Mar 22 05:27:22 UTC 2017
Author: ngie
Date: Wed Mar 22 05:27:20 2017
New Revision: 315699
URL: https://svnweb.freebsd.org/changeset/base/315699
Log:
Print out name of non-dynamic sysctl in sysctl_remove_oid_locked
This will provide a slightly better smoking gun than just stating
"can't remove non-dynamic nodes!" when calling sysctl_ctx_free(9)
and sysctl_remove_{name,oid}(9) with a non-dynamic (likely
static) sysctl.
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Modified:
head/sys/kern/kern_sysctl.c
Modified: head/sys/kern/kern_sysctl.c
==============================================================================
--- head/sys/kern/kern_sysctl.c Wed Mar 22 02:44:39 2017 (r315698)
+++ head/sys/kern/kern_sysctl.c Wed Mar 22 05:27:20 2017 (r315699)
@@ -628,7 +628,8 @@ sysctl_remove_oid_locked(struct sysctl_o
if (oidp == NULL)
return(EINVAL);
if ((oidp->oid_kind & CTLFLAG_DYN) == 0) {
- printf("can't remove non-dynamic nodes!\n");
+ printf("Warning: can't remove non-dynamic nodes (%s)!\n",
+ oidp->oid_name);
return (EINVAL);
}
/*
More information about the svn-src-head
mailing list