From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CIJOI-0004Fw-0w for mharc-grub-devel@gnu.org; Fri, 15 Oct 2004 00:08:30 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CIJOG-0004Fl-89 for grub-devel@gnu.org; Fri, 15 Oct 2004 00:08:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CIJOF-0004FI-4n for grub-devel@gnu.org; Fri, 15 Oct 2004 00:08:27 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CIJOF-0004FF-1E for grub-devel@gnu.org; Fri, 15 Oct 2004 00:08:27 -0400 Received: from [207.217.120.54] (helo=conure.mail.pas.earthlink.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CIJGb-0004o6-Hk for grub-devel@gnu.org; Fri, 15 Oct 2004 00:00:33 -0400 Received: from user-0vvde2s.cable.mindspring.com ([63.246.184.92] helo=miracle) by conure.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 1CIJGa-0007dg-00 for grub-devel@gnu.org; Thu, 14 Oct 2004 21:00:32 -0700 Received: from hollis by miracle with local (Exim 3.36 #1 (Debian)) id 1CIJAa-0001rL-00 for ; Thu, 14 Oct 2004 22:54:20 -0500 Date: Thu, 14 Oct 2004 22:54:19 -0500 To: grub-devel@gnu.org Message-ID: <20041015035419.GA7139@miracle> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6+20040722i From: Hollis Blanchard Subject: [ppc patch] fix Old World disk access 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, 15 Oct 2004 04:08:28 -0000 This patch works around a bug in Old World Mac firmware. It allows "open" to succeed but fails at least "seek" when disks are opened with a trailing ":0". With the patch, we can get output like this: grub> linux (scsi/sd, Possible partitions are: Partition num:0, Filesystem type Unknown Partition num:1, Filesystem type Unknown Partition num:2, Filesystem type Unknown Partition num:3, Filesystem type Unknown Partition num:4, Filesystem type Unknown Partition num:5, Filesystem type ext2 (The use of BAT mappings must be replaced before the kernel will boot, but unfortunately that will have to wait for another day.) -Hollis 2004-10-14 Hollis Blanchard * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is set in grub_ieee1275_flags. Index: disk/powerpc/ieee1275/ofdisk.c =================================================================== RCS file: /cvsroot/grub/grub2/disk/powerpc/ieee1275/ofdisk.c,v retrieving revision 1.4 diff -u -r1.4 ofdisk.c --- disk/powerpc/ieee1275/ofdisk.c 13 Oct 2004 23:43:44 -0000 1.4 +++ disk/powerpc/ieee1275/ofdisk.c 15 Oct 2004 03:42:30 -0000 @@ -57,7 +57,9 @@ return grub_errno; /* To access the complete disk add `:0'. */ - grub_strcat (devpath, ":0"); + if (! (grub_ieee1275_flags & GRUB_IEEE1275_NO_PARTITION_0)) + grub_strcat (devpath, ":0"); + grub_ieee1275_open (devpath, &dev_ihandle); if (! dev_ihandle) {