add another workaround for buggy BIOSes into get_diskinfo.
This commit is contained in:
parent
d917526690
commit
e3daf570b2
2 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
2000-11-11 OKUJI Yoshinori <okuji@gnu.org>
|
||||
|
||||
* stage2/bios.c (get_diskinfo): If BIOS supports LBA but doesn't
|
||||
return the correct total number of sectors, compute this by
|
||||
C/H/S returned by get_diskinfo_int13_extensions instead of
|
||||
get_diskinfo_standard.
|
||||
|
||||
2000-11-09 OKUJI Yoshinori <okuji@gnu.org>
|
||||
|
||||
* stage2/disk_io.c (make_saved_active): Set ERRNUM to
|
||||
|
|
|
@ -173,7 +173,13 @@ get_diskinfo (int drive, struct geometry *geometry)
|
|||
/* FIXME: when the 2TB limit becomes critical, we must
|
||||
change the type of TOTAL_SECTORS to unsigned long
|
||||
long. */
|
||||
total_sectors = drp.total_sectors & ~0L;
|
||||
if (drp.total_sectors)
|
||||
total_sectors = drp.total_sectors & ~0L;
|
||||
else
|
||||
/* Some buggy BIOSes doesn't return the total sectors
|
||||
correctly but returns zero. So if it is zero, compute
|
||||
it by C/H/S returned by the LBA BIOS call. */
|
||||
total_sectors = drp.cylinders * drp.heads * drp.sectors;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue