From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1BtslD-0004Xs-4p for mharc-grub-devel@gnu.org; Sun, 08 Aug 2004 14:51:11 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BtslA-0004Xf-L6 for grub-devel@gnu.org; Sun, 08 Aug 2004 14:51:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BtslA-0004XT-2C for grub-devel@gnu.org; Sun, 08 Aug 2004 14:51:08 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Btsl9-0004XQ-VW for grub-devel@gnu.org; Sun, 08 Aug 2004 14:51:08 -0400 Received: from [145.74.66.11] (helo=mail-cn.han.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Btsh0-0002r7-KL for grub-devel@gnu.org; Sun, 08 Aug 2004 14:46:50 -0400 Received: from localhost (charlie.han.nl [145.74.66.9]) by mail-cn.han.nl (Postfix) with ESMTP id 30C3D8380 for ; Sun, 8 Aug 2004 20:46:50 +0200 (CEST) Received: from mail-cn.han.nl ([145.74.66.11]) by localhost (charlie.han.nl [145.74.66.9]) (amavisd-new, port 10024) with ESMTP id 28407-09 for ; Sun, 8 Aug 2004 20:46:48 +0200 (CEST) Received: from mail1.han.nl (mail1.han.nl [145.74.103.11]) by mail-cn.han.nl (Postfix) with ESMTP id 39AEF81E9 for ; Sun, 8 Aug 2004 20:46:48 +0200 (CEST) Received: from marco.marco-g.com (a82-92-27-129.adsl.xs4all.nl [82.92.27.129]) by mail1.han.nl (Postfix) with ESMTP id BA796C045 for ; Sun, 8 Aug 2004 19:46:50 +0200 (CEST) Mail-Copies-To: metgerards@student.han.nl To: The development of GRUB 2 References: <20040808173040.GA11531@artax.karlin.mff.cuni.cz> <87smaxldbe.fsf@marco.marco-g.com> <20040808181720.GA14939@artax.karlin.mff.cuni.cz> From: Marco Gerards Date: Sun, 08 Aug 2004 20:47:11 +0200 In-Reply-To: <20040808181720.GA14939@artax.karlin.mff.cuni.cz> (Tomas Ebenlendr's message of "Sun, 8 Aug 2004 20:17:20 +0200") Message-ID: <87oelllb68.fsf@marco.marco-g.com> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new@vscan-cn.han.nl Subject: Re: bugfix, hostfs 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: Sun, 08 Aug 2004 18:51:08 -0000 ebik@artax.karlin.mff.cuni.cz (Tomas Ebenlendr) writes: > I don't *need* it, it is just comfortable way to access files from > grub-emu. I also don't *need* to load modules in grub-emu, but if it > will be easy and not user-confusing, it will make easier solving some > problems. Ok, I just asked out of interest. >> Most comments are still about the GCS. > > Hmm, I wrote the patch for myself, and then I forgot to read it > carefully. So I'm sory for inconvenient code. np. I am happy you took the time to do this work. :) >> > +#ifndef GRUB_UTIL >> > +#error cannot live outside host fs >> > +#endif >> >> I think there is no need to do this. >> > > Maybe. I'm just used to write in files that shouldn't be ported to other > "parts" of software that they can't be ported. If someone would compile this code for usage outside of grub-emu it won't compile anyway. :) >> > + if ((signed) device->disk->id != -2) { >> >> What is -2? >> > > Oh, sorry. Just a magic constant. Probably there should be better > identification (e.g. magic device->disk->data (e.g. device->disk == > device->disk->data)). This identification is used in hostfs_mount() Ok. If you can't do it that way it is better to use a macro like GRUB_HOSTFS_DISK_ID or so. >> >> > + grub_strncpy(pathbuf,path,/*FIXME*/2048 - 1); >> >> Why do you use pathbuf? Can't you just use path directly? If that is >> not possible use MAX_PATH_LEN here when it is defined and dynamic >> memory allocation otherwise (when there is no limit). >> > > I concatenate path of directory and its entries to stat them. I will use > the MAX_PATH_LEN. I only forgot that I forgot the name of this constant. > (Uh). Oh, I thought it wasn't written to. I must have missed something then. Please be careful with MAX_PATH_LEN, GNU/Hurd does not define it because there is no limit at all. In that case better use dynamic allocation. Thanks, Marco