Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/lkm Fix example lkms. The misc/example one was never co...



details:   https://anonhg.NetBSD.org/src/rev/0ee455d595e4
branches:  trunk
changeset: 556911:0ee455d595e4
user:      atatat <atatat%NetBSD.org@localhost>
date:      Tue Dec 30 06:53:26 2003 +0000

description:
Fix example lkms.  The misc/example one was never converted to the new
lkm stuff, and syscall/example was never told that we use lwp now, and
not proc.

diffstat:

 sys/lkm/misc/example/example_misc.c       |  10 +++++-----
 sys/lkm/misc/example/lkminit_misc.c       |  10 +++++-----
 sys/lkm/syscall/example/example_syscall.c |  10 +++++-----
 sys/lkm/syscall/example/lkminit_syscall.c |   4 ++--
 4 files changed, 17 insertions(+), 17 deletions(-)

diffs (137 lines):

diff -r 1aaecf5d9ae4 -r 0ee455d595e4 sys/lkm/misc/example/example_misc.c
--- a/sys/lkm/misc/example/example_misc.c       Tue Dec 30 03:57:19 2003 +0000
+++ b/sys/lkm/misc/example/example_misc.c       Tue Dec 30 06:53:26 2003 +0000
@@ -33,17 +33,17 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *     $NetBSD: example_misc.c,v 1.2 2001/11/12 23:23:24 lukem Exp $
+ *     $NetBSD: example_misc.c,v 1.3 2003/12/30 06:53:26 atatat Exp $
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: example_misc.c,v 1.2 2001/11/12 23:23:24 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: example_misc.c,v 1.3 2003/12/30 06:53:26 atatat Exp $");
 
 #include <sys/param.h>
 #include <sys/ioctl.h>
 #include <sys/systm.h>
 
-int misccall __P((struct proc *, void *, register_t *));
+int misccall __P((struct lwp *, void *, register_t *));
 
 /*
  * This is the actual code for system call...  it can be static because
@@ -60,8 +60,8 @@
  * files into a single ".o" file for use by "modload".
  */
 int
-misccall( p, uap, retval)
-       struct proc     *p;
+misccall(l, uap, retval)
+       struct lwp      *l;
        void            *uap;
        register_t      retval[];
 {
diff -r 1aaecf5d9ae4 -r 0ee455d595e4 sys/lkm/misc/example/lkminit_misc.c
--- a/sys/lkm/misc/example/lkminit_misc.c       Tue Dec 30 03:57:19 2003 +0000
+++ b/sys/lkm/misc/example/lkminit_misc.c       Tue Dec 30 06:53:26 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lkminit_misc.c,v 1.3 2003/09/01 17:11:03 jdolecek Exp $        */
+/*     $NetBSD: lkminit_misc.c,v 1.4 2003/12/30 06:53:26 atatat Exp $  */
 
 /*
  * Makefile for miscmod
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lkminit_misc.c,v 1.3 2003/09/01 17:11:03 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lkminit_misc.c,v 1.4 2003/12/30 06:53:26 atatat Exp $");
 
 #include <sys/param.h>
 #include <sys/ioctl.h>
@@ -98,7 +98,7 @@
        int                     i;
        struct lkm_misc         *args = lkmtp->private.lkm_misc;
        int                     err = 0;        /* default = success*/
-       extern int sys_lkmnosys __P((struct proc *, void *, register_t *));
+       extern int sys_lkmnosys __P((struct lwp *, void *, register_t *));
 
        switch( cmd) {
        case LKM_E_LOAD:
@@ -134,7 +134,7 @@
                bcopy( &newent, &sysent[ i], sizeof( struct sysent));
 
                /* done!*/
-               args->lkm_offset = i;   /* slot in sysent[]*/
+               args->mod.lkm_offset = i;       /* slot in sysent[]*/
 
 
                /* if we make it to here, print copyright on console*/
@@ -147,7 +147,7 @@
 
        case LKM_E_UNLOAD:
                /* current slot...*/
-               i = args->lkm_offset;
+               i = args->mod.lkm_offset;
 
                /* replace current slot contents with old contents*/
                bcopy( &oldent, &sysent[ i], sizeof( struct sysent));
diff -r 1aaecf5d9ae4 -r 0ee455d595e4 sys/lkm/syscall/example/example_syscall.c
--- a/sys/lkm/syscall/example/example_syscall.c Tue Dec 30 03:57:19 2003 +0000
+++ b/sys/lkm/syscall/example/example_syscall.c Tue Dec 30 06:53:26 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: example_syscall.c,v 1.3 2002/06/01 14:07:33 simonb Exp $       */
+/*     $NetBSD: example_syscall.c,v 1.4 2003/12/30 06:53:26 atatat Exp $       */
 
 /*
  * example_syscall.c
@@ -37,13 +37,13 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: example_syscall.c,v 1.3 2002/06/01 14:07:33 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: example_syscall.c,v 1.4 2003/12/30 06:53:26 atatat Exp $");
 
 #include <sys/param.h>
 #include <sys/ioctl.h>
 #include <sys/systm.h>
 
-int     example_syscall __P((struct proc *, void *, register_t *));
+int     example_syscall __P((struct lwp *, void *, register_t *));
 
 /*
  * This is the actual code for system call...  it can be static because
@@ -60,8 +60,8 @@
  * files into a single ".o" file for use by "modload".
  */
 int
-example_syscall(p, uap, retval)
-       struct proc     *p;
+example_syscall(l, uap, retval)
+       struct lwp      *l;
        void            *uap;
        register_t      retval[];
 {
diff -r 1aaecf5d9ae4 -r 0ee455d595e4 sys/lkm/syscall/example/lkminit_syscall.c
--- a/sys/lkm/syscall/example/lkminit_syscall.c Tue Dec 30 03:57:19 2003 +0000
+++ b/sys/lkm/syscall/example/lkminit_syscall.c Tue Dec 30 06:53:26 2003 +0000
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lkminit_syscall.c,v 1.3 2001/11/12 23:23:27 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lkminit_syscall.c,v 1.4 2003/12/30 06:53:26 atatat Exp $");
 
 #include <sys/param.h>
 #include <sys/ioctl.h>
@@ -51,7 +51,7 @@
 #include <sys/errno.h>
 
 
-int    example_syscall __P((struct proc *, void *, register_t *));
+int    example_syscall __P((struct lwp *, void *, register_t *));
 int    syscall_example_lkmentry __P((struct lkm_table *, int, int));
 
 static int syscall_load __P((struct lkm_table *, int));



Home | Main Index | Thread Index | Old Index