From owner-freebsd-current Mon Jan 13 0: 2:34 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D68737B401 for ; Mon, 13 Jan 2003 00:02:33 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8FCEF43ED8 for ; Mon, 13 Jan 2003 00:02:32 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id TAA05231; Mon, 13 Jan 2003 19:02:26 +1100 Date: Mon, 13 Jan 2003 19:03:02 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Nate Lawson Cc: Sean Kelly , Subject: Re: fdisk issues? In-Reply-To: <20030113181713.O11356-100000@gamplex.bde.org> Message-ID: <20030113185731.V11356-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 13 Jan 2003, Bruce Evans wrote: > On Sun, 12 Jan 2003, Nate Lawson wrote: > > > On Sun, 12 Jan 2003, Sean Kelly wrote: > > > edgemaster# fdisk ad1 > > > Floating exception (core dumped) > ... > > The more important question > > is "who in the kernel is setting these to 0?" as that part needs work too. > > Well, fdisk itself sets these to 0. The ioctls to get the number of > heads and sectors may fail because they are unimplemented, and then > the sloppy error handling in the code quoted above bites. It divides > if the DIOCGMEDIASIZE ioctl succeeded, but a divisor is 0 if the earlier > head or sector ioctl failed. The head and/or sector counts are only > statically initialized to 0 in this case, since the fallback which set > them to 1 was axed. This explains Sean's case. He was not using GEOM (see his original mail). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message