From owner-freebsd-hackers Mon Nov 2 14:53:34 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA21206 for freebsd-hackers-outgoing; Mon, 2 Nov 1998 14:53:34 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA21198 for ; Mon, 2 Nov 1998 14:53:30 -0800 (PST) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id JAA11601; Tue, 3 Nov 1998 09:23:09 +1030 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.1/8.9.0) id JAA20710; Tue, 3 Nov 1998 09:22:49 +1030 (CST) Message-ID: <19981103092249.W354@freebie.lemis.com> Date: Tue, 3 Nov 1998 09:22:49 +1030 From: Greg Lehey To: Martti Kuparinen , hackers@FreeBSD.ORG Subject: Re: Pseudo-device as a LKM References: <3.0.6.32.19981102124453.02ce8b30@openmail.lmf.ericsson.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <3.0.6.32.19981102124453.02ce8b30@openmail.lmf.ericsson.se>; from Martti Kuparinen on Mon, Nov 02, 1998 at 12:44:53PM +0200 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Monday, 2 November 1998 at 12:44:53 +0200, Martti Kuparinen wrote: > I want to implement a pseudo-device as LKM. But the question is where > to find a working example? I've looked at e.g. the if_tun device, > but the unload is not successful: > > # modload /lkm/if_tun_mod.o > # modunload -n if_tun_mod > modunload: LMUNLOAD: Device busy > > So please give any pointers. I'm using 2.2.7-R but I could jump into 3.0 > if that's what needed. Well, first, LKMs are going away. The replacement is called KLD (Kernel Loadable Module). Secondly, the question of unloading a module is a matter of implementation. I don't think you should automatically consider it an error if an LKM can't be unloaded. In general, this is a decision made in the unload code. Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message