Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Sep 2009 15:34:19 +0000 (UTC)
From:      Takahashi Yoshihiro <nyan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r197457 - stable/8/lib/libdisk
Message-ID:  <200909241534.n8OFYJLN000570@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nyan
Date: Thu Sep 24 15:34:18 2009
New Revision: 197457
URL: http://svn.freebsd.org/changeset/base/197457

Log:
  MFC: r197322 and r197374
  
    Revision: 197322
    Log:
      Correct BIOS header sanitizing on pc98.
  
    Revision: 197374
    Log:
      Disable a check on a disk size because it's too strict.  This change is
      to avoid using incorrect geometry.
  
     It seems that this is the same problem in g_part_bsd_read()@g_part_bsd.c.
  
     Reviewed by: rink
  
  Approved by:	re (kib)

Modified:
  stable/8/lib/libdisk/   (props changed)
  stable/8/lib/libdisk/change.c

Modified: stable/8/lib/libdisk/change.c
==============================================================================
--- stable/8/lib/libdisk/change.c	Thu Sep 24 14:30:17 2009	(r197456)
+++ stable/8/lib/libdisk/change.c	Thu Sep 24 15:34:18 2009	(r197457)
@@ -36,17 +36,22 @@ Sanitize_Bios_Geom(struct disk *disk)
 
 	if (disk->bios_cyl >= 65536)
 		sane = 0;
-	if (disk->bios_hd > 256)
-		sane = 0;
 #ifdef PC98
+	if (disk->bios_hd >= 256)
+		sane = 0;
 	if (disk->bios_sect >= 256)
+		sane = 0;
 #else
+	if (disk->bios_hd > 256)
+		sane = 0;
 	if (disk->bios_sect > 63)
-#endif
 		sane = 0;
+#endif
+#if 0	/* Disable a check on a disk size.  It's too strict. */
 	if (disk->bios_cyl * disk->bios_hd * disk->bios_sect !=
 	    disk->chunks->size)
 		sane = 0;
+#endif
 	if (sane)
 		return;
 



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