Date: Wed, 29 Mar 2017 08:00:13 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r316128 - stable/11/sys/kern Message-ID: <201703290800.v2T80DNZ050467@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Wed Mar 29 08:00:13 2017 New Revision: 316128 URL: https://svnweb.freebsd.org/changeset/base/316128 Log: MFC r315699: 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. Modified: stable/11/sys/kern/kern_sysctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sysctl.c ============================================================================== --- stable/11/sys/kern/kern_sysctl.c Wed Mar 29 08:00:11 2017 (r316127) +++ stable/11/sys/kern/kern_sysctl.c Wed Mar 29 08:00:13 2017 (r316128) @@ -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); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703290800.v2T80DNZ050467>