Coding question: finding the size of a block device

Mike Meyer mwm-keyword-freebsdhackers2.e313df at mired.org
Thu Jun 22 21:38:40 UTC 2006


In <1151008839.2360.30.camel at LatitudeFC5.network>, Andrew <andrew.chace at gmail.com> 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 statfs to get the
information. Linux appears to have it as well, so it may be portable.

	<mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.


More information about the freebsd-hackers mailing list