From owner-freebsd-bugs Sun Dec 29 23:46:11 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id XAA05366 for bugs-outgoing; Sun, 29 Dec 1996 23:46:11 -0800 (PST) Received: from offensive.communica.com.au (offensive-eth1.adl.communica.com.au [192.82.222.18]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id XAA05337 for ; Sun, 29 Dec 1996 23:45:28 -0800 (PST) Received: from communica.com.au (frenzy.communica.com.au [192.82.222.65]) by offensive.communica.com.au (8.7.6/8.7.3) with SMTP id SAA24923 for ; Mon, 30 Dec 1996 18:14:27 +1030 (CST) Received: by communica.com.au (4.1/SMI-4.1) id AA05225; Mon, 30 Dec 96 18:12:28 CDT From: brawley@communica.com.au (Ivan Brawley) Message-Id: <9612300742.AA05225@communica.com.au> Subject: LKMs and character special devices To: freebsd-bugs@freebsd.org Date: Mon, 30 Dec 1996 18:12:28 +1030 (CST) X-Mailer: ELM [version 2.4 PL21] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk After spending quite some time (too much time) on trying to port a package to FreeBSD 2.2, I noticed something. In the file /usr/src/sys/kern/kern_lkm.c where it does some of the initializing of the LKMs, noticed that there is code to add a block special device through a LKM, but not a character special device. Case statement begins at line 688 (or there abouts) in function _lkm_dev(). Theres just a break in the case statment for the case of LM_DT_CHAR. Meaning, for someone to write a LKM that adds a character special device to the system, must add the entery into the cdevsw list themselves. The next querk I found was in /usr/include/sys/lkm.h. The MOD_DEV macro seems to be wrong in defining _module (rather, it tryes to define name ## _module, then when you try to use the DISPATCH macro, the compiler errs with "_module symbol not found". The problem I have noticed is in versions 960501-SNAP, 960801-SNAP and the October snap, and the 2.2 BETA release. Thanks. Ivan Brawley.