From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KBsln-0000BY-NP for mharc-grub-devel@gnu.org; Thu, 26 Jun 2008 10:48:19 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KBslm-00009g-N0 for grub-devel@gnu.org; Thu, 26 Jun 2008 10:48:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KBslj-00006i-TY for grub-devel@gnu.org; Thu, 26 Jun 2008 10:48:18 -0400 Received: from [199.232.76.173] (port=36795 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KBslj-00006f-Oo for grub-devel@gnu.org; Thu, 26 Jun 2008 10:48:15 -0400 Received: from c60.cesmail.net ([216.154.195.49]:24921) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1KBslj-0005j7-7q for grub-devel@gnu.org; Thu, 26 Jun 2008 10:48:15 -0400 Received: from unknown (HELO relay.cesmail.net) ([192.168.1.81]) by c60.cesmail.net with ESMTP; 26 Jun 2008 10:48:14 -0400 Received: from [192.168.0.21] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by relay.cesmail.net (Postfix) with ESMTP id 2655D618F22 for ; Thu, 26 Jun 2008 10:48:14 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <20080626142010.GD7511@thorin> References: <1214430514.11716.19.camel@dv> <20080626142010.GD7511@thorin> Content-Type: text/plain Date: Thu, 26 Jun 2008 10:48:13 -0400 Message-Id: <1214491693.30044.5.camel@dv> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 (2.22.2-2.fc9) Content-Transfer-Encoding: 7bit X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: Failure to embed core.img is fatal now 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: Thu, 26 Jun 2008 14:48:19 -0000 On Thu, 2008-06-26 at 16:20 +0200, Robert Millan wrote: > On Wed, Jun 25, 2008 at 05:48:34PM -0400, Pavel Roskin wrote: > > > > I'm also surprised that the code alternately uses dir and > > DEFAULT_DIRECTORY to calculate core_path. core_path is calculated 3 > > times in one function! If dir and DEFAULT_DIRECTORY are used correctly, > > I suggest that two different variables are used for what is now called > > core_path. > > Might be a remnant from when grub-setup mangled prefix? I recently moved > this off grub-setup and into grub-install/grub-mkimage so that core.img had > the right prefix regardless on whether it was being loaded directly by a > multiboot loader or via grub-setup. No, it's all old code, traced to years 2003-2004. But it needs to be handled better because we need to move things around at this point. If nothing else, it will make the code more readable and less prone to breakages. > Or maybe I'm completely out of context here. In any case, please take into > account that modifications done to core.img by grub-setup have no effect if > core.img is being loaded directly. I know. That's why they are only written to disk if core.img is not embedded. Anyway, I think there is a much simpler approach. Changes to the memory image of core.img should be applied after the image is tested for readability. Until then, they should be in temporary variables. -- Regards, Pavel Roskin