fix Old World disk access
PATCH 1/1 fix Old World disk access
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 <[email protected]>
* 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
powerpc/ieee1275/ofdisk.c +3 -1
@@ -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) {
Quoted 5 lines · Hollis Blanchard
2004-10-14 Hollis Blanchard <[email protected]>
*
disk/powerpc/ieee1275/ofdisk.c(grub_ofdisk_open): Do not append ":0" to devpath if theGRUB_IEEE1275_NO_PARTITION_0flag is set ingrub_ieee1275_flags.
You can commit this patch.
Quoted 5 lines
Index:
disk/powerpc/ieee1275/ofdisk.c
===================================================================
RCS file: /cvsroot/grub/grub2/disk/powerpc/ieee1275/ofdisk.c,v retrieving revision 1.4
diff -u -r1.4ofdisk.c
Can you please make patches using cvs -up next time?
Thanks,
Marco