diff options
author | peter <peter@FreeBSD.org> | 2001-02-04 11:46:17 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-02-04 11:46:17 +0000 |
commit | e2c0e675c777b6b35071509ccb2c17dc40681f65 (patch) | |
tree | 4012853e9b95fc92cec630b7ba4d43712c79a0ed /sys/net/net_osdep.h | |
parent | 7a682ee86450868c28fbaae23e63bfdbe7aa1094 (diff) | |
download | FreeBSD-src-e2c0e675c777b6b35071509ccb2c17dc40681f65.zip FreeBSD-src-e2c0e675c777b6b35071509ccb2c17dc40681f65.tar.gz |
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 <sys/module.h> in it. I will be
taking this out shortly - this affects a number of drivers.
Diffstat (limited to 'sys/net/net_osdep.h')
-rw-r--r-- | sys/net/net_osdep.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sys/net/net_osdep.h b/sys/net/net_osdep.h index fc77022..3bb3c18 100644 --- a/sys/net/net_osdep.h +++ b/sys/net/net_osdep.h @@ -165,5 +165,31 @@ extern const char *if_name __P((struct ifnet *)); #define HAVE_OLD_BPF +/* + * Deprecated. + */ +#include <sys/module.h> +#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 /*_KERNEL*/ #endif /*__NET_NET_OSDEP_H_DEFINED_ */ |