Date: Mon, 20 Oct 1997 17:00:23 -0700 (PDT) From: Archie Cobbs <archie@whistle.com> To: freebsd-hackers@freebsd.org Subject: Broken device LKM in 2.2 Message-ID: <199710210000.RAA11140@bubba.whistle.com>
next in thread | raw e-mail | index | archive | help
I guess nobody makes device type LKM's in 2.2.. but sys/lkm.h is broken with respect to them. Here's a hack that fixes this. Perhaps the "name ## _module", which is different from the other module types, is there for some reason (?) Anyway, it's incompatible with the DISPATCH macro defined later in the file, and this fixes it... More properly we should use MOD_DISPATCH instead of DISPATCH, keep the "name ## _module" in MOD_DEV, add it also to the other types, and use the first argument of MOD_DISPATCH -- the module name -- in that macro to do a similar concatenation there. -Archie Index: lkm.h =================================================================== RCS file: /cvs/freebsd/src/sys/sys/lkm.h,v retrieving revision 1.12.2.1 diff -c -r1.12.2.1 lkm.h *** 1.12.2.1 1997/06/29 08:45:45 --- lkm.h 1997/10/20 23:23:49 *************** *** 234,240 **** #define MOD_DEV(name,devtype,devslot,devp) \ MOD_DECL(name); \ ! static struct lkm_dev name ## _module = { \ LM_DEV, \ LKM_VERSION, \ #name ## "_mod", \ --- 234,240 ---- #define MOD_DEV(name,devtype,devslot,devp) \ MOD_DECL(name); \ ! static struct lkm_dev _module = { \ LM_DEV, \ LKM_VERSION, \ #name ## "_mod", \ ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710210000.RAA11140>