diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2003-09-20 05:23:43 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2003-09-20 05:23:43 +0000 |
commit | 551b53740ecd1a84eb5bf1e89319cd6e6b61d9fa (patch) | |
tree | 12398e1fee3bcad87f4e174a55bdeffea29eac25 /sys | |
parent | 4b509c523b5e11ec07637d561a59b4e59307b794 (diff) |
move the checks after we fixed the hd info.
from Thorsten Glaser <tg-v2003 at netcologne dot de> via toby@.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/stand/libsa/biosdev.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/arch/i386/stand/libsa/biosdev.c b/sys/arch/i386/stand/libsa/biosdev.c index fc0f9cd306d..aae4f586e13 100644 --- a/sys/arch/i386/stand/libsa/biosdev.c +++ b/sys/arch/i386/stand/libsa/biosdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: biosdev.c,v 1.65 2003/09/19 04:17:00 fgsch Exp $ */ +/* $OpenBSD: biosdev.c,v 1.66 2003/09/20 05:23:42 fgsch Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -114,6 +114,12 @@ bios_getdiskinfo(int dev, bios_diskinfo_t *pdi) if (rv & 0xff) return (1); + /* Fix up info */ + pdi->bios_number = dev; + pdi->bios_heads++; + pdi->bios_cylinders &= 0x3ff; + pdi->bios_cylinders++; + /* Sanity check */ if (!pdi->bios_cylinders || !pdi->bios_heads || !pdi->bios_sectors) return(1); @@ -122,12 +128,6 @@ bios_getdiskinfo(int dev, bios_diskinfo_t *pdi) if (pdi->bios_heads < 2) return(1); - /* Fix up info */ - pdi->bios_number = dev; - pdi->bios_heads++; - pdi->bios_cylinders &= 0x3ff; - pdi->bios_cylinders++; - /* NOTE: * This currently hangs/reboots some machines * The IBM Thinkpad 750ED for one. |