summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfgsch <fgsch@openbsd.org>2003-09-20 05:23:42 +0000
committerfgsch <fgsch@openbsd.org>2003-09-20 05:23:42 +0000
commit73cc185fa09ecede98119c7c8274e312e78683d9 (patch)
treee505012086affa1dd93db3e3d1e1266f714bf41f
parentpowerpc ld.so has a slightly unreasonable expectation about __got_start (diff)
downloadwireguard-openbsd-73cc185fa09ecede98119c7c8274e312e78683d9.tar.xz
wireguard-openbsd-73cc185fa09ecede98119c7c8274e312e78683d9.zip
move the checks after we fixed the hd info.
from Thorsten Glaser <tg-v2003 at netcologne dot de> via toby@.
-rw-r--r--sys/arch/i386/stand/libsa/biosdev.c14
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.