From e2c0e675c777b6b35071509ccb2c17dc40681f65 Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 4 Feb 2001 11:46:17 +0000 Subject: Pull the rug from under the 'LKM Compatability' macro - PSEUDO_SET(). There are two 3rd party code chunks using this still - the IPv6 stuff and i4b. Give them a private copy as an alternative to changing them too much. XXX sys/kernel.h still has a #include in it. I will be taking this out shortly - this affects a number of drivers. --- sys/i4b/include/i4b_global.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'sys/i4b') diff --git a/sys/i4b/include/i4b_global.h b/sys/i4b/include/i4b_global.h index d4dc77d..f2e9bff 100644 --- a/sys/i4b/include/i4b_global.h +++ b/sys/i4b/include/i4b_global.h @@ -59,6 +59,34 @@ #endif +#if defined(__FreeBSD__) && __FreeBSD__ >= 5 +/* + * Deprecated LKM interface. + */ +#include +#define PSEUDO_SET(sym, name) \ + static int name ## _modevent(module_t mod, int type, void *data) \ + { \ + void (*initfunc)(void *) = (void (*)(void *))data; \ + switch (type) { \ + case MOD_LOAD: \ + /* printf(#name " module load\n"); */ \ + initfunc(NULL); \ + break; \ + case MOD_UNLOAD: \ + printf(#name " module unload - not possible for this module type\n"); \ + return EINVAL; \ + } \ + return 0; \ + } \ + static moduledata_t name ## _mod = { \ + #name, \ + name ## _modevent, \ + (void *)sym \ + }; \ + DECLARE_MODULE(name, name ## _mod, SI_SUB_PSEUDO, SI_ORDER_ANY) +#endif + /*---------------*/ /* time handling */ /*---------------*/ -- cgit v1.1