summaryrefslogtreecommitdiff
path: root/sys/kern/kern_module.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2004-07-13 19:36:59 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2004-07-13 19:36:59 +0000
commit65a311fcb2f44fce7eb05160d3198cefed5c27f9 (patch)
treed2eb15e6477b3d5e7e1f7c49c1e2eed3b85ec318 /sys/kern/kern_module.c
parent1a946b9fef9f4b4cd10611232e8844d4c2d33e69 (diff)
Notes
Diffstat (limited to 'sys/kern/kern_module.c')
-rw-r--r--sys/kern/kern_module.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/kern_module.c b/sys/kern/kern_module.c
index 3832922f5961..158612e822c1 100644
--- a/sys/kern/kern_module.c
+++ b/sys/kern/kern_module.c
@@ -215,9 +215,15 @@ module_lookupbyid(int modid)
}
int
-module_unload(module_t mod)
+module_unload(module_t mod, int flags)
{
+ int error;
+ error = MOD_EVENT(mod, MOD_QUIESCE);
+ if (error == EOPNOTSUPP)
+ error = 0;
+ if (flags == LINKER_UNLOAD_NORMAL && error != 0)
+ return (error);
return (MOD_EVENT(mod, MOD_UNLOAD));
}