Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 May 2003 14:48:17 -0700 (PDT)
From:      Nate Lawson <nate@root.org>
To:        Maxime Henrion <mux@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern kern_sysctl.c
Message-ID:  <20030529144231.A10415@root.org>
In-Reply-To: <20030529211927.3EF8237B4C4@hub.freebsd.org>
References:  <20030529211927.3EF8237B4C4@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 29 May 2003, Maxime Henrion wrote:
>   Modified files:
>     sys/kern             kern_sysctl.c
>   Log:
>   When loading a module that contains a sysctl which is already compiled
>   in the kernel, the sysctl_register() call would fail, as expected.
>   However, when unloading this module again, the kernel would then panic
>   in sysctl_unregister().  Print a message error instead.
>
> +	/*
> +	 * This can happen when a module fails to register and is
> +	 * being unloaded afterwards.  It should not be a panic()
> +	 * for normal use.
> +	 */
> +	if (error)
> +		printf("%s: failed to unregister sysctl\n", __func__);

Thank you, this is helpful.  However, we have quite a few error messages
that appear when an attach fails.  Is this one necessary in practice or
should the eventual plan be to change the API to return an errno?  (Note,
not talking about 5.1 here).

-Nate



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