On Gwe, 2003-07-18 at 00:58, Lucius, Leland wrote:
> > I'm looking for a generic way to find the size of a block special.
>
> Open '/dev/xxx...' and start reading until ya get nuttin' back.
>
> (Aaaa, Leland's poor attempt at humor strikes again... :-))

Thats actually one approach - with old old Linux you used to do this
although people did a binary search rather than linear read. Nowdays
there are ioctl calls which will give you volume sizes. You do want
to use the later 64bit ioctl if it is present as BLKGETSIZE ioctls only
work up to 1Tb or so.

Alan

Reply via email to