From owner-freebsd-bugs Mon Dec 1 09:10:11 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA21682 for bugs-outgoing; Mon, 1 Dec 1997 09:10:11 -0800 (PST) (envelope-from owner-freebsd-bugs) Received: (from gnats@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA21660; Mon, 1 Dec 1997 09:10:02 -0800 (PST) (envelope-from gnats) Date: Mon, 1 Dec 1997 09:10:02 -0800 (PST) Message-Id: <199712011710.JAA21660@hub.freebsd.org> To: freebsd-bugs Cc: From: Bruce Evans Subject: Re: kern/5186: bug in diskslice_machdep.c (fix included) Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR kern/5186; it has been noted by GNATS. From: Bruce Evans 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