Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jun 2009 16:51:07 +0000 (UTC)
From:      Ulf Lilleengen <lulf@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r194244 - in head: lib/libdisk sbin/fdisk
Message-ID:  <200906151651.n5FGp77O095200@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: lulf
Date: Mon Jun 15 16:51:07 2009
New Revision: 194244
URL: http://svn.freebsd.org/changeset/base/194244

Log:
  - The maximum number of heads is 255, not 256.
  
  Pointed out by:		marcel

Modified:
  head/lib/libdisk/change.c
  head/sbin/fdisk/fdisk.c

Modified: head/lib/libdisk/change.c
==============================================================================
--- head/lib/libdisk/change.c	Mon Jun 15 16:42:08 2009	(r194243)
+++ head/lib/libdisk/change.c	Mon Jun 15 16:51:07 2009	(r194244)
@@ -36,7 +36,7 @@ Sanitize_Bios_Geom(struct disk *disk)
 
 	if (disk->bios_cyl >= 65536)
 		sane = 0;
-	if (disk->bios_hd > 256)
+	if (disk->bios_hd >= 256)
 		sane = 0;
 #ifdef PC98
 	if (disk->bios_sect >= 256)

Modified: head/sbin/fdisk/fdisk.c
==============================================================================
--- head/sbin/fdisk/fdisk.c	Mon Jun 15 16:42:08 2009	(r194243)
+++ head/sbin/fdisk/fdisk.c	Mon Jun 15 16:51:07 2009	(r194244)
@@ -1066,8 +1066,8 @@ process_geometry(CMD *command)
 	    warnx("ERROR line %d: number of heads not specified",
 		    current_line_number);
 	    status = 0;
-	    } else if (dos_heads > 256) {
-	    warnx("ERROR line %d: number of heads must be within (1-256)",
+	    } else if (dos_heads > 255) {
+	    warnx("ERROR line %d: number of heads must be within (1-255)",
 		    current_line_number);
 	    status = 0;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906151651.n5FGp77O095200>