diff options
author | nate <nate@FreeBSD.org> | 1995-09-16 05:02:37 +0000 |
---|---|---|
committer | nate <nate@FreeBSD.org> | 1995-09-16 05:02:37 +0000 |
commit | 7ab21f76508af2e4e10ea475050e6f5d831f556e (patch) | |
tree | 04ed3d33bfdf691b89c7782d035ffb8173cadfe5 /sys/i386/boot/biosboot/disk.c | |
parent | 8d7d06f373dac7b48b0c0ddc8def8ae4ded1c880 (diff) | |
download | FreeBSD-src-7ab21f76508af2e4e10ea475050e6f5d831f556e.zip FreeBSD-src-7ab21f76508af2e4e10ea475050e6f5d831f556e.tar.gz |
When confronted with a drive that says there are 36 sectors/track,
ignore and set it to 18 sectors/track. This allows FreeBSD to boot with
2.88MB floppies which are used in older ThinkPads.
Submitted by: Random Net person whose name I lost
Diffstat (limited to 'sys/i386/boot/biosboot/disk.c')
-rw-r--r-- | sys/i386/boot/biosboot/disk.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/i386/boot/biosboot/disk.c b/sys/i386/boot/biosboot/disk.c index e6f3e5d..8227b1b 100644 --- a/sys/i386/boot/biosboot/disk.c +++ b/sys/i386/boot/biosboot/disk.c @@ -24,7 +24,7 @@ * the rights to redistribute these changes. * * from: Mach, Revision 2.2 92/04/04 11:35:49 rpd - * $Id: disk.c,v 1.13 1995/05/30 07:58:31 rgrimes Exp $ + * $Id: disk.c,v 1.14 1995/06/23 01:42:42 ache Exp $ */ /* @@ -91,7 +91,10 @@ devopen(void) #endif di = get_diskinfo(dosdev); - spc = (spt = SPT(di)) * HEADS(di); + spt = SPT(di); + /* Hack for 2.88MB drives */ + if (spt == 36) spt = 18; + spc = spt * HEADS(di); if (dosdev == 2) { boff = 0; |