summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-01-03 20:39:38 +0000
committerjhb <jhb@FreeBSD.org>2006-01-03 20:39:38 +0000
commit9a6ec66269f2bbf12b49df2f37cd7859c013c323 (patch)
treeb73114f64202678658711adbfa468dfa313cecb3 /sys
parentdc23cee8b8a93763105123f83ff2e28d93db6f55 (diff)
downloadFreeBSD-src-9a6ec66269f2bbf12b49df2f37cd7859c013c323.zip
FreeBSD-src-9a6ec66269f2bbf12b49df2f37cd7859c013c323.tar.gz
Fix a couple of issues with the ibcs2 module event handler. First, return
success instead of EOPNOTSUPP when being loaded. Secondly, if there are no ibcs2 processes running when a MOD_UNLOAD request is made, break out to return success instead of falling through into the default case which returns EOPNOTSUPP. With these fixes, I can now kldload and subsequently kldunload the ibcs2 module. PR: kern/82026 (and several duplicates) Reported by: lots of folks MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/ibcs2/ibcs2_sysvec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/i386/ibcs2/ibcs2_sysvec.c b/sys/i386/ibcs2/ibcs2_sysvec.c
index 74be782..864e89f 100644
--- a/sys/i386/ibcs2/ibcs2_sysvec.c
+++ b/sys/i386/ibcs2/ibcs2_sysvec.c
@@ -105,6 +105,8 @@ ibcs2_modevent(module_t mod, int type, void *unused)
int rval = 0;
switch(type) {
+ case MOD_LOAD:
+ break;
case MOD_UNLOAD:
/* if this was an ELF module we'd use elf_brand_inuse()... */
sx_slock(&allproc_lock);
@@ -115,8 +117,9 @@ ibcs2_modevent(module_t mod, int type, void *unused)
}
}
sx_sunlock(&allproc_lock);
+ break;
default:
- return (EOPNOTSUPP);
+ rval = EOPNOTSUPP;
break;
}
return (rval);
OpenPOWER on IntegriCloud