mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Correct BIOS header sanitizing on pc98.
MFC after: 3 days
This commit is contained in:
parent
d6dbb0dba0
commit
0f0f85be13
1 changed files with 7 additions and 4 deletions
|
|
@ -36,14 +36,17 @@ Sanitize_Bios_Geom(struct disk *disk)
|
|||
|
||||
if (disk->bios_cyl >= 65536)
|
||||
sane = 0;
|
||||
#ifdef PC98
|
||||
if (disk->bios_hd >= 256)
|
||||
sane = 0;
|
||||
if (disk->bios_sect >= 256)
|
||||
sane = 0;
|
||||
#else
|
||||
if (disk->bios_hd > 256)
|
||||
sane = 0;
|
||||
#ifdef PC98
|
||||
if (disk->bios_sect >= 256)
|
||||
#else
|
||||
if (disk->bios_sect > 63)
|
||||
#endif
|
||||
sane = 0;
|
||||
#endif
|
||||
if (disk->bios_cyl * disk->bios_hd * disk->bios_sect !=
|
||||
disk->chunks->size)
|
||||
sane = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue