From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MjeRH-0008UV-GE for mharc-grub-devel@gnu.org; Fri, 04 Sep 2009 15:27:15 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MjeRF-0008Tr-Bf for grub-devel@gnu.org; Fri, 04 Sep 2009 15:27:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MjeRA-0008Rj-OS for grub-devel@gnu.org; Fri, 04 Sep 2009 15:27:13 -0400 Received: from [199.232.76.173] (port=56210 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjeRA-0008RO-8o for grub-devel@gnu.org; Fri, 04 Sep 2009 15:27:08 -0400 Received: from xvm-190-8.ghst.net ([217.70.190.8]:46669 helo=aybabtu.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MjeR9-0005tF-TM for grub-devel@gnu.org; Fri, 04 Sep 2009 15:27:08 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1MjeR4-0002qm-Pz for grub-devel@gnu.org; Fri, 04 Sep 2009 21:27:04 +0200 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1MjeQz-0008Uy-Pt for grub-devel@gnu.org; Fri, 04 Sep 2009 21:26:57 +0200 Date: Fri, 4 Sep 2009 21:26:57 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20090904192657.GA4059@thorin> References: <1252090364.2888.12.camel@fz.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1252090364.2888.12.camel@fz.local> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: r2558 made another use case for make_relative_to_its_root visible (else SEGFAULT) 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: Fri, 04 Sep 2009 19:27:13 -0000 On Fri, Sep 04, 2009 at 08:52:44PM +0200, Felix Zielcke wrote: > r2558 actually enabled this code path which was (almost) never executed > before in probe(): > > if (S_ISREG (st.st_mode)) > { > /* Regular file. Verify that we can read it properly. */ > > grub_file_t file; > grub_util_info ("reading %s via OS facilities", path); > filebuf_via_sys = grub_util_read_image (path); > > grub_util_info ("reading %s via GRUB facilities", path); > asprintf (&grub_path, "(%s)%s", drive_name, path); > file = grub_file_open (grub_path); > filebuf_via_grub = xmalloc (file->size); > grub_file_read (file, filebuf_via_grub, file->size); > > grub_util_info ("comparing"); > > if (memcmp (filebuf_via_grub, filebuf_via_sys, file->size)) > grub_util_error ("files differ"); > } > printf ("%s\n", fs->name); > > If /boot is on a seperate partition and you run `grub-probe -t > fs /boot/grub/core.img' grub_file_open returns 0 because grub_path is > the full system path and not a relative path which GRUB needs. A proper fix for this would be too intrusive for 1.97. Unless someone has a bright idea, I'll comment it out untill we've released. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."