Re: Coding question: finding the size of a block device

2006-06-24 Thread andrew chace
On 6/24/06, Frank Mitchell [EMAIL PROTECTED] 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

Re: Coding question: finding the size of a block device

2006-06-24 Thread Frank Mitchell
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:

Coding question: finding the size of a block device

2006-06-22 Thread Andrew
Hello, First off, is this the appropriate list for coding questions? I read questions@, but I do not often see discussions about code there, so I thought I might ask here instead. If not, please correct me. I need to know the size of a block device in some code that I'm writing. I checked the

Re: Coding question: finding the size of a block device

2006-06-22 Thread Mike Meyer
In [EMAIL PROTECTED], Andrew [EMAIL PROTECTED] typed: So I guess my question is: is there a POSIX compatible function that will allow me to check the size of a given block device? I'd be surprised - POSIX doesn't seem to deal with block devices at all. Checking the sources to df, it uses

Re: Coding question: finding the size of a block device

2006-06-22 Thread Dave Cornejo
There are no block devices in FreeBSD, only character devices http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/driverbasics-block.html dave c In [EMAIL PROTECTED], Andrew [EMAIL PROTECTED] typed: So I guess my question is: is there a POSIX compatible function that will allow

Re: Coding question: finding the size of a block device

2006-06-22 Thread Dan Nelson
In the last episode (Jun 22), Mike Meyer said: In [EMAIL PROTECTED], Andrew [EMAIL PROTECTED] typed: So I guess my question is: is there a POSIX compatible function that will allow me to check the size of a given block device? I'd be surprised - POSIX doesn't seem to deal with block

Re: Coding question: finding the size of a block device

2006-06-22 Thread Eric Anderson
Dan Nelson wrote: In the last episode (Jun 22), Mike Meyer said: In [EMAIL PROTECTED], Andrew [EMAIL PROTECTED] typed: So I guess my question is: is there a POSIX compatible function that will allow me to check the size of a given block device? I'd be surprised - POSIX doesn't seem to deal