Hell[o]

> You sent a patch, but the patch didn't fix the problem.  The code we have is
> obviously buggy, but we don't know exactly what should it do.

Eeeek, why ? No one told me that there is any problem in it. Maybe you
talk about first one ? Attached current.

-- 
--- 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-15 21:45:40.998210358 +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",
@@ -139,9 +139,10 @@
     return grub_error (GRUB_ERR_READ_ERROR,
 		       "Seek error, can't seek block %llu",
 		       sector);
+  size *= 512UL;
   grub_ieee1275_read ((grub_ieee1275_ihandle_t) disk->data, buf,
-		      size * 512UL, &actual);
-  if (actual != actual)
+		      size, &actual);
+  if (actual != size)
     return grub_error (GRUB_ERR_READ_ERROR, "Read error on block: %llu",
 		       sector);
     
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to