Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2018 11:11:02 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r340946 - stable/12/sys/kern
Message-ID:  <201811261111.wAQBB2V1016998@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Mon Nov 26 11:11:02 2018
New Revision: 340946
URL: https://svnweb.freebsd.org/changeset/base/340946

Log:
  MFC r340621:
  Be more verbose when a sysctl fails to unregister.
  Print name of sysctl in question.
  
  Sponsored by:		Mellanox Technologies

Modified:
  stable/12/sys/kern/kern_sysctl.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/kern_sysctl.c
==============================================================================
--- stable/12/sys/kern/kern_sysctl.c	Mon Nov 26 11:09:51 2018	(r340945)
+++ stable/12/sys/kern/kern_sysctl.c	Mon Nov 26 11:11:02 2018	(r340946)
@@ -565,8 +565,10 @@ sysctl_unregister_oid(struct sysctl_oid *oidp)
 	 * being unloaded afterwards.  It should not be a panic()
 	 * for normal use.
 	 */
-	if (error)
-		printf("%s: failed to unregister sysctl\n", __func__);
+	if (error) {
+		printf("%s: failed(%d) to unregister sysctl(%s)\n",
+		    __func__, error, oidp->oid_name);
+	}
 }
 
 /* Initialize a new context to keep track of dynamically added sysctls. */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811261111.wAQBB2V1016998>