Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linux/linux_common.c
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | linux_common_modevent(module_t mod, int type, void *data) | ||||
case MOD_LOAD: | case MOD_LOAD: | ||||
#ifdef INVARIANTS | #ifdef INVARIANTS | ||||
linux_check_errtbl(); | linux_check_errtbl(); | ||||
#endif | #endif | ||||
linux_dev_shm_create(); | linux_dev_shm_create(); | ||||
linux_osd_jail_register(); | linux_osd_jail_register(); | ||||
SET_FOREACH(ldhp, linux_device_handler_set) | SET_FOREACH(ldhp, linux_device_handler_set) | ||||
linux_device_register_handler(*ldhp); | linux_device_register_handler(*ldhp); | ||||
linux_netlink_register(); | |||||
break; | break; | ||||
case MOD_UNLOAD: | case MOD_UNLOAD: | ||||
linux_dev_shm_destroy(); | linux_dev_shm_destroy(); | ||||
linux_osd_jail_deregister(); | linux_osd_jail_deregister(); | ||||
SET_FOREACH(ldhp, linux_device_handler_set) | SET_FOREACH(ldhp, linux_device_handler_set) | ||||
linux_device_unregister_handler(*ldhp); | linux_device_unregister_handler(*ldhp); | ||||
linux_netlink_deregister(); | |||||
break; | break; | ||||
default: | default: | ||||
return (EOPNOTSUPP); | return (EOPNOTSUPP); | ||||
} | } | ||||
return (0); | return (0); | ||||
} | } | ||||
static moduledata_t linux_common_mod = { | static moduledata_t linux_common_mod = { | ||||
"linux_common", | "linux_common", | ||||
linux_common_modevent, | linux_common_modevent, | ||||
0 | 0 | ||||
}; | }; | ||||
DECLARE_MODULE(linux_common, linux_common_mod, SI_SUB_EXEC, SI_ORDER_ANY); | DECLARE_MODULE(linux_common, linux_common_mod, SI_SUB_EXEC, SI_ORDER_ANY); | ||||
MODULE_VERSION(linux_common, 1); | MODULE_VERSION(linux_common, 1); | ||||
MODULE_DEPEND(linux_common, netlink, 1, 1, 1); |