diff options
author | nyan <nyan@FreeBSD.org> | 2009-09-19 03:33:18 +0000 |
---|---|---|
committer | nyan <nyan@FreeBSD.org> | 2009-09-19 03:33:18 +0000 |
commit | 1bd982e6783f9fda0704368667156319bccef571 (patch) | |
tree | 32a1ffb6b73ab3f9ae95de1ee9826ffe2e35180f /lib | |
parent | 497f06f54ee2a5db44089247e669fb3a16070bb7 (diff) | |
download | FreeBSD-src-1bd982e6783f9fda0704368667156319bccef571.zip FreeBSD-src-1bd982e6783f9fda0704368667156319bccef571.tar.gz |
Correct BIOS header sanitizing on pc98.
MFC after: 3 days
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libdisk/change.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libdisk/change.c b/lib/libdisk/change.c index 297ac11..0ee047f 100644 --- a/lib/libdisk/change.c +++ b/lib/libdisk/change.c @@ -36,14 +36,17 @@ Sanitize_Bios_Geom(struct disk *disk) if (disk->bios_cyl >= 65536) sane = 0; - if (disk->bios_hd > 256) - 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; if (disk->bios_sect > 63) -#endif sane = 0; +#endif if (disk->bios_cyl * disk->bios_hd * disk->bios_sect != disk->chunks->size) sane = 0; |