From: mickey Date: Wed, 2 Apr 1997 05:30:05 +0000 (+0000) Subject: fix bios geometry calculation X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=18bc08b0eacf885052048686e9ef4a5e8785a42b;p=openbsd fix bios geometry calculation --- diff --git a/sbin/fdisk/fdisk.c b/sbin/fdisk/fdisk.c index 47004eef7ae..08456cce35e 100644 --- a/sbin/fdisk/fdisk.c +++ b/sbin/fdisk/fdisk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fdisk.c,v 1.12 1997/01/31 11:59:05 deraadt Exp $ */ +/* $OpenBSD: fdisk.c,v 1.13 1997/04/02 05:30:05 mickey Exp $ */ /* $NetBSD: fdisk.c,v 1.11 1995/10/04 23:11:19 ghudson Exp $ */ /* @@ -28,7 +28,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: fdisk.c,v 1.12 1997/01/31 11:59:05 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: fdisk.c,v 1.13 1997/04/02 05:30:05 mickey Exp $"; #endif /* not lint */ #include @@ -400,11 +400,11 @@ intuit_translated_geometry() break; } } - if (heads != -1) + if (heads > 0) break; } - if (heads == -1) + if (heads <= 0) return; /* Now figure out the number of sectors from a single mapping. */