diff options
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_mac.c | 1 | ||||
-rw-r--r-- | sys/kern/kern_module.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_syscalls.c | 3 | ||||
-rw-r--r-- | sys/kern/subr_bus.c | 5 | ||||
-rw-r--r-- | sys/kern/vfs_init.c | 3 |
5 files changed, 12 insertions, 2 deletions
diff --git a/sys/kern/kern_mac.c b/sys/kern/kern_mac.c index 94dfc26..db6fc59 100644 --- a/sys/kern/kern_mac.c +++ b/sys/kern/kern_mac.c @@ -359,6 +359,7 @@ mac_policy_modevent(module_t mod, int type, void *data) error = 0; break; default: + error = EOPNOTSUPP; break; } diff --git a/sys/kern/kern_module.c b/sys/kern/kern_module.c index a8c704e..9dfe3ba 100644 --- a/sys/kern/kern_module.c +++ b/sys/kern/kern_module.c @@ -228,7 +228,7 @@ module_unload(module_t mod, int flags) int error; error = MOD_EVENT(mod, MOD_QUIESCE); - if (error == EOPNOTSUPP) + if (error == EOPNOTSUPP || error == EINVAL) error = 0; if (flags == LINKER_UNLOAD_NORMAL && error != 0) return (error); diff --git a/sys/kern/kern_syscalls.c b/sys/kern/kern_syscalls.c index 3f8a38b..a437fb3 100644 --- a/sys/kern/kern_syscalls.c +++ b/sys/kern/kern_syscalls.c @@ -115,6 +115,9 @@ syscall_module_handler(struct module *mod, int what, void *arg) } error = syscall_deregister(data->offset, &data->old_sysent); return error; + default : + return EOPNOTSUPP; + } if (data->chainevh) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 8c8b799..ae59230 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -2535,6 +2535,8 @@ root_bus_module_handler(module_t mod, int what, void* arg) case MOD_SHUTDOWN: device_shutdown(root_bus); return (0); + default: + return (EOPNOTSUPP); } return (0); @@ -2612,6 +2614,9 @@ driver_module_handler(module_t mod, int what, void *arg) if (!error && dmd->dmd_chainevh) error = dmd->dmd_chainevh(mod,what,dmd->dmd_chainarg); break; + default: + error = EOPNOTSUPP; + break; } return (error); diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c index 871404c..9597519 100644 --- a/sys/kern/vfs_init.c +++ b/sys/kern/vfs_init.c @@ -528,7 +528,8 @@ vfs_modevent(module_t mod, int type, void *data) if (vfc) error = vfs_unregister(vfc); break; - default: /* including MOD_SHUTDOWN */ + default: + error = EOPNOTSUPP; break; } return (error); |