Date: Mon, 02 Jun 2003 16:44:38 +0200 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Andrew <andrew@ugh.net.au> Cc: freebsd-hackers@freebsd.org Subject: Re: Retrieving disk geometry Message-ID: <11067.1054565078@critter.freebsd.dk> In-Reply-To: Your message of "Tue, 03 Jun 2003 00:22:19 %2B1000." <20030603001755.S68271-100000@starbug.ugh.net.au>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <20030603001755.S68271-100000@starbug.ugh.net.au>, Andrew writes: >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? Use the ioctls you find in <sys/disk.h> they should work on all disk devices. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?11067.1054565078>