All of lore.kernel.org
 help / color / mirror / Atom feed
* [ppc patch] fix Old World disk access
@ 2004-10-15  3:54 Hollis Blanchard
  2004-10-15 10:31 ` Marco Gerards
  0 siblings, 1 reply; 2+ messages in thread
From: Hollis Blanchard @ 2004-10-15  3:54 UTC (permalink / raw)
  To: grub-devel

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ppc patch] fix Old World disk access
  2004-10-15  3:54 [ppc patch] fix Old World disk access Hollis Blanchard
@ 2004-10-15 10:31 ` Marco Gerards
  0 siblings, 0 replies; 2+ messages in thread
From: Marco Gerards @ 2004-10-15 10:31 UTC (permalink / raw)
  To: The development of GRUB 2

Hollis Blanchard <hollis@penguinppc.org> writes:

> 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.

You can commit this patch.

> 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

Can you please make patches using cvs -up next time?

Thanks,
Marco




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-10-15 10:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-15  3:54 [ppc patch] fix Old World disk access Hollis Blanchard
2004-10-15 10:31 ` Marco Gerards

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.