From 9a6ec66269f2bbf12b49df2f37cd7859c013c323 Mon Sep 17 00:00:00 2001 From: jhb Date: Tue, 3 Jan 2006 20:39:38 +0000 Subject: 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 --- sys/i386/ibcs2/ibcs2_sysvec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys') 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); -- cgit v1.1