From owner-freebsd-hackers Thu Jan 21 22:35:26 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA27970 for freebsd-hackers-outgoing; Thu, 21 Jan 1999 22:35:26 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA27965 for ; Thu, 21 Jan 1999 22:35:23 -0800 (PST) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id WAA00535; Thu, 21 Jan 1999 22:35:11 -0800 (PST) Received: from bubba.whistle.com( 207.76.205.7) by whistle.com via smap (V2.0) id xma000527; Thu, 21 Jan 99 22:34:44 -0800 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id WAA10001; Thu, 21 Jan 1999 22:34:44 -0800 (PST) From: Archie Cobbs Message-Id: <199901220634.WAA10001@bubba.whistle.com> Subject: Re: Loading KLD from the kernel In-Reply-To: from Doug Rabson at "Jan 19, 99 09:21:18 am" To: dfr@nlsystems.com (Doug Rabson) Date: Thu, 21 Jan 1999 22:34:44 -0800 (PST) Cc: freebsd-hackers@FreeBSD.ORG, julian@whistle.com X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Doug Rabson writes: > > I tried simply incrementing lf->userrefs after loading the module > > from the kernel, but somehow it went back to zero (?) > > This field is a count of how many times a user has loaded the file using > kldload(2). It is there to prevent a user from unloading a file which was > loaded explicitly by the kernel (e.g. as a dependancy). Incrementing > userrefs should have worked though - can you watch what happens in the > debugger and find out why it is being reset? Well, now it seems to work.. Nevermind :-) -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message