Date: Thu, 29 May 2003 18:00:15 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: Maxime Henrion <mux@freebsd.org> Cc: Nate Lawson <nate@root.org> Subject: Re: cvs commit: src/sys/kern kern_sysctl.c Message-ID: <XFMail.20030529180015.jhb@FreeBSD.org> In-Reply-To: <20030529215252.GF21011@elvis.mu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 29-May-2003 Maxime Henrion wrote: > Nate Lawson wrote: >> 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). > > I agree with you that we should think about this issue a bit more once > 5.1 is out, as I'm not comfortable with this error message. However, if > I remember right, changing the API is not an option after 5.1 since we > promised to not break APIs and ABIs past this release. If the message > turns out to be annoying, it can be removed a bit later and we can have > sysctl_unregister() silently fail. Changing the API would probably be > better, but I bet we'll have to do this for 6.0. AFAIK, the API and ABI is not frozen until RELENG_5 is branched. That isn't happening at 5.1 release, so there is still some time to fix the API/ABI if need be. We really should start avoiding making API/ABI changes though after 5.1 is out. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030529180015.jhb>