All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hollis Blanchard <hollis@penguinppc.org>
To: grub-devel@gnu.org
Subject: [ppc patch] fix Old World disk access
Date: Thu, 14 Oct 2004 22:54:19 -0500	[thread overview]
Message-ID: <20041015035419.GA7139@miracle> (raw)

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  <hollis@penguinppc.org>

	* 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)
     {



             reply	other threads:[~2004-10-15  4:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-15  3:54 Hollis Blanchard [this message]
2004-10-15 10:31 ` [ppc patch] fix Old World disk access Marco Gerards

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041015035419.GA7139@miracle \
    --to=hollis@penguinppc.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.