On Wed, Oct 10, 2007 at 05:15:19PM +0200, Marcin Kurek wrote: > Hell[o] > > When testing grub on Pegasos 1 machine I was hit by quite weird > problem when reading partition table. It seems my friends firmware > version do not set status to 0 after grub_ieee1275_read() even if the > read was fine. > > Attached patch fixed the problem. > > -- > --- Marcin 'Morgoth' Kurek ---
> diff -urN grub2.org/disk/ieee1275/ofdisk.c grub2/disk/ieee1275/ofdisk.c > --- grub2.org/disk/ieee1275/ofdisk.c 2007-07-22 01:32:20.000000000 +0200 > +++ grub2/disk/ieee1275/ofdisk.c 2007-10-07 22:55:48.000000000 +0200 > @@ -124,7 +124,7 @@ > grub_ofdisk_read (grub_disk_t disk, grub_disk_addr_t sector, > grub_size_t size, char *buf) > { > - grub_ssize_t status, actual; > + grub_ssize_t status = 0, actual = 0; > unsigned long long pos; > > grub_dprintf ("disk", The "status" part seems good; then I wondered why you also set "actual" and found... if (actual != actual) return grub_error (GRUB_ERR_READ_ERROR, "Read error on block: %llu", sector); woops. actual is never != actual!! what is this supposed to do? If it works like grub_ieee1275_seek, I suppose what we want is to zero it and then compare it with 0? (instead of with itself ;-)). -- Robert Millan <GPLv2> I know my rights; I want my phone call! <DRM> What use is a phone call, if you are unable to speak? (as seen on /.) _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel