Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1IFqg8-0003Hr-8b for mharc-grub-devel@gnu.org; Tue, 31 Jul 2007 08:18:20 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IFqg6-0003HB-PF for grub-devel@gnu.org; Tue, 31 Jul 2007 08:18:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IFqg5-0003Gt-Db for grub-devel@gnu.org; Tue, 31 Jul 2007 08:18:18 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IFqg4-0003Gj-Ty for grub-devel@gnu.org; Tue, 31 Jul 2007 08:18:16 -0400 Received: from smtp-vbr11.xs4all.nl ([194.109.24.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IFqg4-000555-Fx for grub-devel@gnu.org; Tue, 31 Jul 2007 08:18:16 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr11.xs4all.nl (8.13.8/8.13.8) with ESMTP id l6VCIFk2032104 for ; Tue, 31 Jul 2007 14:18:15 +0200 (CEST) (envelope-from mgerards@xs4all.nl) From: Marco Gerards To: The development of GRUB 2 References: <20070612162639.GA10829@ws3.vdp.com> <87abtohbsg.fsf@xs4all.nl> <20070728164413.GA13941@ws3.vdp.com> <874pjnhrya.fsf@xs4all.nl> <20070730041655.GA2258@ws3.vdp.com> <87myxegmuz.fsf@xs4all.nl> <20070730121823.GA5159@ws3.vdp.com> <87tzrkg7bu.fsf@xs4all.nl> Mail-Copies-To: mgerards@xs4all.nl Date: Tue, 31 Jul 2007 14:20:12 +0200 In-Reply-To: (bean123ch@gmail.com's message of "Tue, 31 Jul 2007 20:08:08 +0800") Message-ID: <87fy34g3yb.fsf@xs4all.nl> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner X-detected-kernel: FreeBSD 4.6-4.9 Subject: Re: NTFS file system driver (update 3) 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: Tue, 31 Jul 2007 12:18:19 -0000 Bean writes: > On 7/31/07, Marco Gerards wrote: >> Bean writes: >> >> > On Mon, Jul 30, 2007 at 01:19:32PM +0200, Marco Gerards wrote: >> >> Can you pass it around inside one of the structs? I understand that >> >> passing it around as parameter is not really nice. The problem is >> >> that this might actually break other code, which I want to prevent. I >> >> hope you see this might become a serious problem? >> > >> > Ok, I pass the hook around using parameter, please see if there is other >> > problem. >> >> It looks like you still use the read hook, as in you change the read >> hook of the disk, am I right? With passing "it" around I meant some >> hook, not the disk-> hook. Because this is more like a higher level >> function, using this in the filesystem has some problems like I will >> describe below. >> >> I noticed in your other email that you were playing with the blocklist >> command. Did you check if the blocklist that is returned by the >> blocklist command is *exactly* as it is supposed to be? So that no >> blocks are missing or added because of your code? >> >> My main problem is this... You do not need a hook for this. Can you >> please in detail describe what the hook is supposed to do? The main >> reason why I ask about this is that you do not need the hook *at all*. >> It makes the code very hard to understand and I am, as you noticed, >> afraid that it might break the blocklist feature. >> >> If you need a block number for certain data, you can better make a >> function to calculate the block number somehow. Or store it, or >> whatever. I am sure you would use something like this if there was no >> hook, so can't you just pretend that this hook does not exist? >> >> If something is not clear yet, feel free to ask me. My problem is >> that I can not fully understand the code yet. But if you show me >> where to look and tell me what certain things do, I am certainly >> willing to invest some time in this. > > I believe disk hook is ok, as in grub_fshelp_read_file: > > if (blknr) > { > disk->read_hook = read_hook; > > grub_disk_read (disk, blknr, skipfirst, > blockend, buf); > disk->read_hook = 0; > if (grub_errno) > return -1; > } > > grub_disk_read will call the hook when it's appropriate. Ok. > btw, The blocklist command works for files in ntfs partition. Ok, that things will not be broken is the most important thing to me. I do not really like the use of hooks since that makes the code a bit hard to maintain for me. In case of bug reports, I hope you will be available to handle them? Later today I will go over your patch and apply it. Thanks, Marco