From owner-cvs-all Tue Mar 23 15:13: 1 1999 Delivered-To: cvs-all@freebsd.org Received: from ns.skylink.it (ns.skylink.it [194.177.113.1]) by hub.freebsd.org (Postfix) with ESMTP id B565B15380; Tue, 23 Mar 1999 15:12:51 -0800 (PST) (envelope-from hibma@skylink.it) Received: from heidi.plazza.it (va-139.skylink.it [194.177.113.139]) by ns.skylink.it (8.9.1/8.8.8) with ESMTP id AAA32352; Wed, 24 Mar 1999 00:11:13 +0100 Received: from localhost (localhost.plazza.it [127.0.0.1]) by heidi.plazza.it (8.8.8/8.8.5) with SMTP id AAA02684; Wed, 24 Mar 1999 00:04:26 +0100 (CET) Date: Wed, 24 Mar 1999 00:04:26 +0100 (CET) From: Nick Hibma X-Sender: n_hibma@heidi.plazza.it Reply-To: Nick Hibma To: Doug Rabson Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_conf.c In-Reply-To: <199903232111.NAA43509@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk Wouldn't the same apply in subr_bus.c? Let the module self decide first whether it wants to be unloaded or not. Nick Index: subr_bus.c =================================================================== RCS file: /home/ncvs/src/sys/kern/subr_bus.c,v retrieving revision 1.15 diff -u -r1.15 subr_bus.c --- subr_bus.c 1999/01/27 21:49:57 1.15 +++ subr_bus.c 1999/03/23 23:03:04 @@ -1343,9 +1343,13 @@ *dmd->dmd_devclass = devclass_find_internal(dmd->dmd_drivers[0]->name, TRUE); + if (dmd->dmd_chainevh) + error = dmd->dmd_chainevh(mod, what, dmd->dmd_chainarg); break; case MOD_UNLOAD: + if (dmd->dmd_chainevh) + error = dmd->dmd_chainevh(mod, what, dmd->dmd_chainarg); for (i = 0; !error && i < dmd->dmd_ndrivers; i++) { PDEBUG(("Unloading module: driver %s from bus %s", DRIVERNAME(dmd->dmd_drivers[i]), @@ -1356,8 +1360,6 @@ break; } - if (!error && dmd->dmd_chainevh) - error = dmd->dmd_chainevh(mod, what, dmd->dmd_chainarg); return (error); } On Tue, 23 Mar 1999, Doug Rabson wrote: > dfr 1999/03/23 13:11:47 PST > > Modified files: > sys/kern kern_conf.c > Log: > Call the module's unload handler before removing the device from the > cdevsw list. This allows a handler to veto the load without losing its > place in the list. > > PR: kern/10653 > > Revision Changes Path > 1.31 +26 -19 src/sys/kern/kern_conf.c > > -- e-Mail: hibma@skylink.it To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message