From owner-freebsd-hackers Mon Oct 20 17:01:09 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id RAA00417 for hackers-outgoing; Mon, 20 Oct 1997 17:01:09 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id RAA00404 for ; Mon, 20 Oct 1997 17:01:01 -0700 (PDT) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id RAA28205 for ; Mon, 20 Oct 1997 17:00:29 -0700 (PDT) Received: from bubba.whistle.com(207.76.205.7) by whistle.com via smap (V1.3) id sma028203; Mon Oct 20 17:00:24 1997 Received: (from archie@localhost) by bubba.whistle.com (8.8.5/8.6.12) id RAA11140 for freebsd-hackers@freebsd.org; Mon, 20 Oct 1997 17:00:24 -0700 (PDT) From: Archie Cobbs Message-Id: <199710210000.RAA11140@bubba.whistle.com> Subject: Broken device LKM in 2.2 To: freebsd-hackers@freebsd.org Date: Mon, 20 Oct 1997 17:00:23 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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