diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-10-03 20:58:07 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-10-03 20:58:07 +0000 |
commit | 98b9a977f2fc904beaf85348bbc87bbaa7569d7c (patch) | |
tree | c81a7150f3df069bd1c1e9d17fd2e0734c3702a8 /sys/arch/i386 | |
parent | aaffa9428f7ad9e839b95f08cc7d3b64f48eaeb9 (diff) |
avoid sign extension on bios geometry!
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/stand/installboot/installboot.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/i386/stand/installboot/installboot.c b/sys/arch/i386/stand/installboot/installboot.c index 30ef480a723..7e80a44bd78 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.15 1997/09/30 22:10:50 deraadt Exp $ */ +/* $OpenBSD: installboot.c,v 1.16 1997/10/03 20:58:06 deraadt Exp $ */ /* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */ /* @@ -139,16 +139,16 @@ main(argc, argv) mib[0] = CTL_MACHDEP; mib[1] = CPU_BIOS; mib[2] = BIOS_DEV; - size = sizeof(int); + size = sizeof(biosdev); if ((nheads == -1 || nsectors == -1) && sysctl(mib, 3, &biosdev, &size, NULL, 0) != -1) { if (biosdev & 0x80) { - int geo; + u_int geo; mib[2] = BIOS_GEOMETRY; - size = sizeof(int); + size = sizeof(geo); if (sysctl(mib, 3, &geo, &size, NULL, 0) == -1) err(1, "sysctl"); |