diff options
author | Peter Dufault <dufault@FreeBSD.org> | 1997-04-06 11:14:13 +0000 |
---|---|---|
committer | Peter Dufault <dufault@FreeBSD.org> | 1997-04-06 11:14:13 +0000 |
commit | 0ddf9be1f0723916ebd4feb7313d64dffab0c2bb (patch) | |
tree | bb684ae0dbb1f70d89660314962f2e6de0c74843 /share/examples | |
parent | 952d112864d8008aa87278a30a539d888a8493cd (diff) | |
download | src-0ddf9be1f0723916ebd4feb7313d64dffab0c2bb.tar.gz src-0ddf9be1f0723916ebd4feb7313d64dffab0c2bb.zip |
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
Notes
Notes:
svn path=/head/; revision=24674
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 410b52622866..16bbeccf11a4 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); } |