Date: Wed, 29 Mar 2017 08:00:11 +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-10@freebsd.org Subject: svn commit: r316127 - stable/10/sys/kern Message-ID: <201703290800.v2T80Blx050419@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Wed Mar 29 08:00:11 2017 New Revision: 316127 URL: https://svnweb.freebsd.org/changeset/base/316127 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/10/sys/kern/kern_sysctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_sysctl.c ============================================================================== --- stable/10/sys/kern/kern_sysctl.c Wed Mar 29 07:30:59 2017 (r316126) +++ stable/10/sys/kern/kern_sysctl.c Wed Mar 29 08:00:11 2017 (r316127) @@ -429,7 +429,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.v2T80Blx050419>