Date: Wed, 22 Mar 2017 05:27:20 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315699 - head/sys/kern Message-ID: <201703220527.v2M5RKoD026077@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703220527.v2M5RKoD026077>