Date: Wed, 24 Mar 1999 00:04:26 +0100 (CET) From: Nick Hibma <hibma@skylink.it> To: Doug Rabson <dfr@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_conf.c Message-ID: <Pine.BSF.3.96.990323235917.2633A-100000@heidi.plazza.it> In-Reply-To: <199903232111.NAA43509@freefall.freebsd.org>
index | next in thread | previous in thread | raw e-mail
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
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.990323235917.2633A-100000>
