From owner-cvs-src@FreeBSD.ORG Thu May 29 14:48:18 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 08F1537B405 for ; Thu, 29 May 2003 14:48:18 -0700 (PDT) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id ACAFA43FBD for ; Thu, 29 May 2003 14:48:16 -0700 (PDT) (envelope-from nate@rootlabs.com) Received: (qmail 10424 invoked by uid 1000); 29 May 2003 21:48:17 -0000 Date: Thu, 29 May 2003 14:48:17 -0700 (PDT) From: Nate Lawson To: Maxime Henrion In-Reply-To: <20030529211927.3EF8237B4C4@hub.freebsd.org> Message-ID: <20030529144231.A10415@root.org> References: <20030529211927.3EF8237B4C4@hub.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_sysctl.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2003 21:48:18 -0000 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