Subject: Re: documentation on LKM for NetBSD
To: None <netbsd-help@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: netbsd-help
Date: 02/11/2006 06:06:55
In article <2be910602101516o13da608at77f1aa64592d2a09@mail.gmail.com>,
Christos Eleftheriadis  <christos.eleftheriadis@gmail.com> wrote:
>Greetings,
>
>Can someone, please, help me locating some documentation on LKM for
>NetBSD-current?
>
>I have found a very good how to on
>http://etudiant.epita.fr/~jaquem_o/NetBSD_LKM_Driver/
>
>and
>
>http://home.unix-ag.org/bmeurer/NetBSD/howto-lkm.html
>
>these very good docs are for NetBSD 1.6
>
>and when I try to compile on my i386 I get for the fibo.o
>
>main.c:68:42: macro "MOD_DEV" requires 6 arguments, but only 4 given
>
>Any input will be greatly appreciated

fgrep -r MOD_DEV /usr/src/sys/lkm /usr/src/sys/sys

sys/lkm.h:

MOD_DEV(name,devname,bdevp,bdevm,cdevp,cdevm)

name,
device name,
block device switch pointer if block device or NULL,
block device major or -1 to automatically determine,
character device switch pointer if character device or NULL,
character device major or -1 to automatically determine, 

christos