From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1EetqS-0003XM-KP for mharc-grub-devel@gnu.org; Wed, 23 Nov 2005 07:35:28 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EetqQ-0003Wq-Rg for grub-devel@gnu.org; Wed, 23 Nov 2005 07:35:27 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EetqO-0003WG-Ci for grub-devel@gnu.org; Wed, 23 Nov 2005 07:35:26 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EetqO-0003WC-9i for grub-devel@gnu.org; Wed, 23 Nov 2005 07:35:24 -0500 Received: from [145.74.66.11] (helo=mail-cn.han.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EetqO-0003UN-8i for grub-devel@gnu.org; Wed, 23 Nov 2005 07:35:24 -0500 Received: from vscan-cn.han.nl (venus.han.nl [145.74.65.6]) by mail-cn.han.nl (Postfix) with ESMTP id 05C778E77 for ; Wed, 23 Nov 2005 13:33:59 +0100 (CET) Received: from mail-cn.han.nl ([145.74.66.11]) by vscan-cn.han.nl (venus.han.nl [145.74.65.6]) (amavisd-new, port 10024) with ESMTP id 12880-09 for ; Wed, 23 Nov 2005 13:33:59 +0100 (CET) Received: from mail1.han.nl (mail1.han.nl [145.74.103.11]) by mail-cn.han.nl (Postfix) with ESMTP id 7D9508EAD for ; Wed, 23 Nov 2005 13:33:54 +0100 (CET) Received: from localhost.localdomain (mgerards.xs4all.nl [82.92.27.129]) by mail1.han.nl (Postfix) with ESMTP id 129ABC048 for ; Wed, 23 Nov 2005 13:33:54 +0100 (CET) Mail-Copies-To: metgerards@student.han.nl To: The development of GRUB 2 References: <4bf7a326c787c00b52f64b301ebfacdd@penguinppc.org> From: Marco Gerards Date: Wed, 23 Nov 2005 13:33:54 +0100 In-Reply-To: <4bf7a326c787c00b52f64b301ebfacdd@penguinppc.org> (Hollis Blanchard's message of "Tue, 22 Nov 2005 20:58:40 -0600") Message-ID: <87acfv1r2l.fsf@student.han.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new (2.2.0) at vscan-cn.han.nl Subject: Re: module references X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 12:35:27 -0000 Hollis Blanchard writes: > Right now I'm getting a lot of these: > ../fs/affs.c: In function `grub_mod_init': > ../fs/affs.c:556: warning: unused parameter `mod' > ... in fact, one for every GRUB_MOD_INIT in fs/ and partmap/, it seems. Right. `my_mod' is used by the filesystems, but not used from INIT. > This led me to examine the module reference counting system. Most > filesystems don't do anything more than set a "my_mod" global > variable, and never use it. fat.c, on the other hand, seems to > actually be trying to use a refcount. They do use it. When opening a file the reference is increased so the user can't remove the filesystem module until the file is closed. If this is not implemented this way, it's a bug. > Are modules ever automatically unloaded? When? If so, we need a lot > more reference counting. If not, we've got some unnecessary complexity > we should remove. It's done so you can not remove a module that is in use by GRUB or another module. For example when you open a file for a long time. -- Marco