diff options
| author | Bruce Evans <bde@FreeBSD.org> | 1997-04-13 11:10:40 +0000 |
|---|---|---|
| committer | Bruce Evans <bde@FreeBSD.org> | 1997-04-13 11:10:40 +0000 |
| commit | bb008c02c1fb3bb21221c7be53e653dfeb91531c (patch) | |
| tree | 65018a4127dd4fb0d7c17db9e28273edae5c8fe5 /share/examples | |
| parent | 571240d73bf5448276838dd660354d567aeab3e5 (diff) | |
Notes
Diffstat (limited to 'share/examples')
| -rw-r--r-- | share/examples/lkm/syscall/module/newsyscall.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/share/examples/lkm/syscall/module/newsyscall.c b/share/examples/lkm/syscall/module/newsyscall.c index a6f04c910338..bff2b9c639c5 100644 --- a/share/examples/lkm/syscall/module/newsyscall.c +++ b/share/examples/lkm/syscall/module/newsyscall.c @@ -37,17 +37,10 @@ * */ #include <sys/param.h> -#include <sys/ioctl.h> -#include <sys/proc.h> #include <sys/systm.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 mycall __P((struct proc *p, void *uap, int retval[])); @@ -64,12 +57,13 @@ static struct sysent newent = { 0, mycall /* # of args, function pointer*/ }; -MOD_SYSCALL( "newsyscall_mod", -1, &newent); +MOD_SYSCALL(newsyscall_mod, -1, &newent); /* * This function is called each time the module is loaded. Technically, - * we could have made this "lkm_nullcmd" in the "DISPATCH" in "newsyscall()", - * but it's a convenient place to kick a copyright out to the console. + * we could have made this "lkm_nullcmd" in the "MOD_DISPATCH" in + * "newsyscall()", but it's a convenient place to kick a copyright out + * to the console. */ static int newsyscall_load( lkmtp, cmd) @@ -89,7 +83,7 @@ int cmd; /* * External entry point; should generally match name of .o file. The * arguments are always the same for all loaded modules. The "load", - * "unload", and "stat" functions in "DISPATCH" will be called under + * "unload", and "stat" functions in "MOD_DISPATCH" will be called under * their respective circumstances unless their value is "lkm_nullcmd". If * called, they are called with the same arguments (cmd is included to * allow the use of a single function, ver is included for version @@ -111,5 +105,6 @@ struct lkm_table *lkmtp; int cmd; int ver; { - DISPATCH(lkmtp, cmd, ver, newsyscall_load, lkm_nullcmd, lkm_nullcmd) + MOD_DISPATCH(newsyscall_mod, lkmtp, cmd, ver, + newsyscall_load, lkm_nullcmd, lkm_nullcmd) } |
