Hello. Here is a workaround for buggy BIOSes not supplying C/H/S geometry

-- 
Regards
Vladimir 'phcoder' Serbinenko
diff --git a/ChangeLog b/ChangeLog
index f5bc28b..8ce8496 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,5 @@
 2009-05-17  Vladimir Serbinenko  <phco...@gmail.com>
 
-	Not fail if unable to retrieve C/H/S on LBA disks
-
-	* disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully 
-	if unable to retrieve C/H/S on LBA disks
-	
-2009-05-17  Vladimir Serbinenko  <phco...@gmail.com>
-
 	Remove -Werror which causes build to fail on some systems
 
 	* conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
diff --git a/disk/i386/pc/biosdisk.c b/disk/i386/pc/biosdisk.c
index f966330..ba1eb77 100644
--- a/disk/i386/pc/biosdisk.c
+++ b/disk/i386/pc/biosdisk.c
@@ -158,20 +158,8 @@ grub_biosdisk_open (const char *name, grub_disk_t disk)
 					       &data->heads,
 					       &data->sectors) != 0)
         {
-	  if (total_sectors && (data->flags & GRUB_BIOSDISK_FLAG_LBA))
-	    {
-	      data->sectors = 63;
-	      data->heads = 255;
-	      data->cylinders 
-		= grub_divmod64 (total_sectors 
-				 + data->heads * data->sectors - 1, 
-				 data->heads * data->sectors, 0);
-	    }
-	  else
-	    {
-	      grub_free (data);
-	      return grub_error (GRUB_ERR_BAD_DEVICE, "cannot get C/H/S values");
-	    }
+          grub_free (data);
+          return grub_error (GRUB_ERR_BAD_DEVICE, "cannot get C/H/S values");
         }
 
       if (! total_sectors)
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to