Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Jun 2006 17:21:12 -0500
From:      "andrew chace" <andrew.chace@gmail.com>
To:        "Frank Mitchell" <mitchell@cloudynwuk.force9.co.uk>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Coding question: finding the size of a block device
Message-ID:  <5af45dee0606241521r1deda55fh235aac8edd58a49d@mail.gmail.com>
In-Reply-To: <000101c697ab$8684f4e0$0dd5ae51@hal>
References:  <1151008839.2360.30.camel@LatitudeFC5.network> <000101c697ab$8684f4e0$0dd5ae51@hal>

next in thread | previous in thread | raw e-mail | index | archive | help
On 6/24/06, Frank Mitchell <mitchell@cloudynwuk.force9.co.uk> wrote:
>
> Let's assume your Block Device is an ATA Hard Disk and you're using
> FreeBSD
> 6.0 like me.
>
> Take a look at <sys/ata.h> and you'll see a large fully-commented
> structure,
> "struct ata_params", which is used to return the information from the ATA
> "IDENTIFY DEVICE" command using something like:
> "ioctl(DevFil,IOCATAGPARM,&Parms);"
>
> This probably tells you everything you need. Plus IOCATAGPARM also returns
> CD/DVD Drive information using the related IDENTIFY PACKET DEVICE command.
>
> For further details consult the T13 Website. For ATA/ATAPI you might start
> with: "T13 1153D Revision 18" "Information Technology - AT Attachment with
> Packet Interface Extension (ATA/ATAPI-4)". Though there are later
> versions:
> "T13 1321D" (ATA/ATAPI-5) and "T13 1410D" (ATA/ATAPI-6).
>
> Whatever device you have there's probably some Hardware Command which
> gives
> you all the technical details.
>
> Faictz Ce Que Vouldras: Frank Mitchell
>
>
>
> Hello,

Thanks to all who have offered suggestions about how to tackle this problem.
I have a number of different possiblities to consider here, and need to do
some reading at this point to see which option would be best suited to this
particular problem. Thanks very much for your advice!

-Andrew



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5af45dee0606241521r1deda55fh235aac8edd58a49d>