Date: Tue, 19 Jun 2007 08:41:29 GMT From: Cedric GROSS <cedric.gross@cnv.fr> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/113849: [libdisk][patch] Correction of Sanitize_Bios_Geom for large disk Message-ID: <200706190841.l5J8fTQv038172@www.freebsd.org> Resent-Message-ID: <200706190850.l5J8o33C024392@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 113849 >Category: bin >Synopsis: [libdisk][patch] Correction of Sanitize_Bios_Geom for large disk >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jun 19 08:50:03 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Cedric GROSS >Release: 6.2-Release >Organization: CNV >Environment: FreeBSD prt-freebsd.cnv.local 6.2-RELEASE-p5 FreeBSD 6.2-RELEASE-p5 #1: Mon Jun 18 18:01:30 CEST 2007 root@prt-freebsd.cnv.local:/usr/obj/usr/src/sys/VIRT i386 >Description: Sanitize_Bios_Geom check for cylindre/head/sector with old values and use cylindre up to 65535 anyway. >How-To-Repeat: Use HDD larger than 32Gb >Fix: Adjust condition as for PC98, see also PR bin/113682 to adjust sysinstall Patch attached with submission follows: --- src/lib/libdisk/change.c.origin Wed Mar 30 15:03:33 2005 +++ src/lib/libdisk/change.c Tue Jun 19 10:15:58 2007 @@ -34,23 +34,11 @@ sane = 1; -#ifdef PC98 if (disk->bios_cyl >= 65536) -#else - if (disk->bios_cyl > 1024) -#endif sane = 0; -#ifdef PC98 if (disk->bios_hd >= 256) -#else - if (disk->bios_hd > 16) -#endif sane = 0; -#ifdef PC98 if (disk->bios_sect >= 256) -#else - if (disk->bios_sect > 63) -#endif sane = 0; if (disk->bios_cyl * disk->bios_hd * disk->bios_sect != disk->chunks->size) @@ -64,11 +52,7 @@ disk->bios_cyl = disk->chunks->size / (disk->bios_sect * disk->bios_hd); -#ifdef PC98 if (disk->bios_cyl < 65536) -#else - if (disk->bios_cyl < 1024) -#endif return; /* Hmm, try harder... */ @@ -82,7 +66,6 @@ disk->bios_cyl = disk->chunks->size / (disk->bios_sect * disk->bios_hd); -#ifdef PC98 if (disk->bios_cyl < 65536) return; @@ -99,7 +82,8 @@ disk->bios_hd = 255; disk->bios_cyl = disk->chunks->size / (disk->bios_sect * disk->bios_hd); -#endif + + /* should be ok with head=255 and sector=255 */ } void >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706190841.l5J8fTQv038172>