From e5ea88eb01fa65f6a92072c596e1fc88bdeb756e Mon Sep 17 00:00:00 2001 From: christos Date: Fri, 2 Jun 2006 17:40:34 +0000 Subject: [PATCH] PR/33633: Yoshito Komatsu: /sbin/fdisk does not work Downgrade error getting heads to a warning. --- sbin/fdisk/fdisk.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sbin/fdisk/fdisk.c b/sbin/fdisk/fdisk.c index c9192076d1e1..18131a6e7bcf 100644 --- a/sbin/fdisk/fdisk.c +++ b/sbin/fdisk/fdisk.c @@ -1,4 +1,4 @@ -/* $NetBSD: fdisk.c,v 1.100 2006/05/21 16:00:17 christos Exp $ */ +/* $NetBSD: fdisk.c,v 1.101 2006/06/02 17:40:34 christos Exp $ */ /* * Mach Operating System @@ -39,7 +39,7 @@ #include #ifndef lint -__RCSID("$NetBSD: fdisk.c,v 1.100 2006/05/21 16:00:17 christos Exp $"); +__RCSID("$NetBSD: fdisk.c,v 1.101 2006/06/02 17:40:34 christos Exp $"); #endif /* not lint */ #define MBRPTYPENAMES @@ -1333,8 +1333,10 @@ intuit_translated_geometry(void) break; } - if (xheads == -1) - errx(1, "Cannot determine the number of heads"); + if (xheads == -1) { + warnx("Cannot determine the number of heads"); + return; + } /* Estimate the number of cylinders. */ xcylinders = disklabel.d_secperunit / xheads / xsectors;