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
This commit is contained in:
parent
142f81c25d
commit
ab2c368640
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user