From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Mjdu3-000187-J6 for mharc-grub-devel@gnu.org; Fri, 04 Sep 2009 14:52:55 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mjdu1-00017q-NE for grub-devel@gnu.org; Fri, 04 Sep 2009 14:52:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mjdtx-00014f-BL for grub-devel@gnu.org; Fri, 04 Sep 2009 14:52:53 -0400 Received: from [199.232.76.173] (port=42204 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mjdtx-00014W-4O for grub-devel@gnu.org; Fri, 04 Sep 2009 14:52:49 -0400 Received: from moutng.kundenserver.de ([212.227.17.8]:56217) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mjdtw-0000S1-G7 for grub-devel@gnu.org; Fri, 04 Sep 2009 14:52:48 -0400 Received: from [85.180.23.63] (e180023063.adsl.alicedsl.de [85.180.23.63]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0MKt2u-1Mjdtt1fQX-000SVG; Fri, 04 Sep 2009 20:52:45 +0200 From: Felix Zielcke To: The development of GRUB 2 Content-Type: text/plain Date: Fri, 04 Sep 2009 20:52:44 +0200 Message-Id: <1252090364.2888.12.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.27.91 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX18PyJseztXjvA8uFu69RdDPUkVOEDBhQTtFEBN o69Ru3UQnGK+LvSUwsPkNr+6NyZbvLbP36JWvP4PRDNM37rK3L rWghYvaWGUEg4pcj38q+n1HCaXk2Thj X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: 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 18:52:54 -0000 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. -- Felix Zielcke Proud Debian Maintainer