diff options
author | dufault <dufault@FreeBSD.org> | 1997-04-06 11:14:13 +0000 |
---|---|---|
committer | dufault <dufault@FreeBSD.org> | 1997-04-06 11:14:13 +0000 |
commit | e62e4c624ae75b13f1812862aa5ffc194f1921a4 (patch) | |
tree | 42f3ce7dddb1f896f895a6fd33ad3a2b58ecf4b1 /share/examples | |
parent | 7485dac765253c701a97a0ecb94fefd223c9ea62 (diff) | |
download | FreeBSD-src-e62e4c624ae75b13f1812862aa5ffc194f1921a4.zip FreeBSD-src-e62e4c624ae75b13f1812862aa5ffc194f1921a4.tar.gz |
Make MOD_* macros almost consistent:
Use the name argument almost the same in all LKM types. Maintain
the current behavior for the external (e.g., modstat) name for DEV,
EXEC, and MISC types being #name ## "_mod" and SYCALL and VFS only
#name. This is a candidate for change and I vote just the name without
the "_mod".
Change the DISPATCH macro to MOD_DISPATCH for consistency with the
other macros.
Add an LKM_ANON #define to eliminate the magic -1 and associated
signed/unsigned warnings.
Add MOD_PRIVATE to support wcd.c's poking around in the lkm structure.
Change source in tree to use the new interface.
Reviewed by: Bruce Evans
Diffstat (limited to 'share/examples')
-rw-r--r-- | share/examples/lkm/misc/module/miscmod.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/share/examples/lkm/misc/module/miscmod.c b/share/examples/lkm/misc/module/miscmod.c index 410b526..16bbecc 100644 --- a/share/examples/lkm/misc/module/miscmod.c +++ b/share/examples/lkm/misc/module/miscmod.c @@ -37,18 +37,11 @@ * */ #include <sys/param.h> -#include <sys/ioctl.h> -#include <sys/proc.h> #include <sys/systm.h> #include <sys/sysproto.h> -#include <sys/conf.h> -#include <sys/mount.h> #include <sys/exec.h> #include <sys/sysent.h> #include <sys/lkm.h> -#include <a.out.h> -#include <sys/file.h> -#include <sys/errno.h> /* XXX this should be in a header. */ extern int misccall __P((struct proc *p, void *uap, int retval[])); @@ -186,5 +179,6 @@ struct lkm_table *lkmtp; int cmd; int ver; { - DISPATCH(lkmtp, cmd, ver, misc_load, misc_load, lkm_nullcmd); + MOD_DISPATCH(misc, lkmtp, cmd, ver, + misc_load, misc_load, lkm_nullcmd); } |