From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 2 07:22:20 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D05237B401 for ; Mon, 2 Jun 2003 07:22:20 -0700 (PDT) Received: from starbug.ugh.net.au (starbug.ugh.net.au [203.31.238.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9144F43FB1 for ; Mon, 2 Jun 2003 07:22:19 -0700 (PDT) (envelope-from andrew@ugh.net.au) Received: by starbug.ugh.net.au (Postfix, from userid 1000) id 8EC49A80F; Tue, 3 Jun 2003 00:22:19 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by starbug.ugh.net.au (Postfix) with ESMTP id 763495430 for ; Tue, 3 Jun 2003 00:22:19 +1000 (EST) Date: Tue, 3 Jun 2003 00:22:19 +1000 (EST) From: Andrew To: freebsd-hackers@freebsd.org Message-ID: <20030603001755.S68271-100000@starbug.ugh.net.au> X-WonK: *wibble* MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Retrieving disk geometry X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2003 14:22:20 -0000 Hi, Under FreeBSD 4.x the ioctl DIOCGDINFO could be used to retrieve the number of cylinders, heads and sectors of a drive. This could be called on /dev/ad0 for example. Under FreeBSD 5 it seems to produce "Inappropriate ioctl for device" unless you call it on an individual partition (/dev/ad0s1a for example). Is there a way around this? Thanks, Andrew