From 551b53740ecd1a84eb5bf1e89319cd6e6b61d9fa Mon Sep 17 00:00:00 2001 From: "Federico G. Schwindt" Date: Sat, 20 Sep 2003 05:23:43 +0000 Subject: move the checks after we fixed the hd info. from Thorsten Glaser via toby@. --- sys/arch/i386/stand/libsa/biosdev.c | 14 +++++++------- 1 file 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. -- cgit v1.2.3