diff options
author | 1997-09-30 22:10:50 +0000 | |
---|---|---|
committer | 1997-09-30 22:10:50 +0000 | |
commit | 9f3d828a048c7449e4f8fd606bba2ae12e08a9f3 (patch) | |
tree | 6bf895668bd18a9ecf73ab62455e84a925c2d26e /sys | |
parent | Don't blithely use geometry from the disk. Get it from sysctl or (diff) | |
download | wireguard-openbsd-9f3d828a048c7449e4f8fd606bba2ae12e08a9f3.tar.xz wireguard-openbsd-9f3d828a048c7449e4f8fd606bba2ae12e08a9f3.zip |
fix sysctl() call. This code was never tested was it
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/stand/installboot/installboot.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/i386/stand/installboot/installboot.c b/sys/arch/i386/stand/installboot/installboot.c index e45551725a5..30ef480a723 100644 --- a/sys/arch/i386/stand/installboot/installboot.c +++ b/sys/arch/i386/stand/installboot/installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: installboot.c,v 1.14 1997/09/30 21:59:43 millert Exp $ */ +/* $OpenBSD: installboot.c,v 1.15 1997/09/30 22:10:50 deraadt Exp $ */ /* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */ /* @@ -142,7 +142,7 @@ main(argc, argv) size = sizeof(int); if ((nheads == -1 || nsectors == -1) && - sysctl(mib, 2, &biosdev, &size, NULL, 0) != -1) { + sysctl(mib, 3, &biosdev, &size, NULL, 0) != -1) { if (biosdev & 0x80) { int geo; @@ -150,7 +150,7 @@ main(argc, argv) mib[2] = BIOS_GEOMETRY; size = sizeof(int); - if (sysctl(mib, 2, &geo, &size, NULL, 0) == -1) + if (sysctl(mib, 3, &geo, &size, NULL, 0) == -1) err(1, "sysctl"); if (nheads == -1) |