Be more verbose when a sysctl fails to unregister.

Print name of sysctl in question.

MFC after:		1 week
Sponsored by:		Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2018-11-19 09:35:16 +00:00
parent d642b94209
commit 2205f61a31
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=340621

View File

@ -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. */