gracefully ignore inability to retrieve C/H/S on LBA disks
PATCH 1/1 gracefully ignore inability to retrieve C/H/S on LBA disks
Hello. Here is a workaround for buggy BIOSes not supplying C/H/S geometry
Signature · 2 lines
Regards Vladimir 'phcoder' Serbinenko
ChangeLog +0 -7
@@ -1,12 +1,5 @@ 2009-05-17 Vladimir Serbinenko <[email protected]> - 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 <[email protected]> - Remove -Werror which causes build to fail on some systems * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
disk/i386/pc/biosdisk.c +2 -14
@@ -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)
committed
Quoted 6 lines · Vladimir 'phcoder' Serbinenko
Hello. Here is a workaround for buggy BIOSes not supplying C/H/S geometry
--
Regards
Vladimir 'phcoder' Serbinenko
Signature · 2 lines
Regards Vladimir 'phcoder' Serbinenko