Date: Mon, 1 Dec 1997 09:10:02 -0800 (PST) From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs Subject: Re: kern/5186: bug in diskslice_machdep.c (fix included) Message-ID: <199712011710.JAA21660@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/5186; it has been noted by GNATS. From: Bruce Evans <bde@zeta.org.au> To: andre.albsmeier@mchp.siemens.de, FreeBSD-gnats-submit@FreeBSD.ORG Cc: Subject: Re: kern/5186: bug in diskslice_machdep.c (fix included) Date: Tue, 2 Dec 1997 03:57:25 +1100 > Either the code or the comment above it is wrong in sys/i386/isa/diskslice_machdep.c: They still look correct to me. > /* > * If ssector1 is on a cylinder >= 1024, then ssector can't be right. > * Allow the C/H/S for it to be 1023/ntracks-1/nsectors, or correct > * apart from the cylinder being reduced modulo 1024. Always allow > * 1023/255/63. > */ > if (ssector < ssector1 > && ((chs_ssect == nsectors && dp->dp_shd == ntracks - 1 > && chs_scyl == 1023) > || (secpercyl != 0 > && (ssector1 - ssector) % (1024 * secpercyl) == 0)) > || (dp->dp_scyl == 255 && dp->dp_shd == 255 > && dp->dp_ssect == 255)) { > > Since we can't enter 255 for the number of sectors, I think it's the code. dp_ssect consists of a 6-bit sector number and the top two bits of the head number. dp->ssect == 255 means sector 63, head >= 768. In particular, it is 255 for 1023/255/63 geometry. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712011710.JAA21660>