Hi,
On Fri, Mar 31, 2000 at 09:26:22AM -0700, Jeff V. Merkey wrote:
>
> This is nice to know, but it's not much help. Is there a cleaner way?
> The simplest would be to allow me to scan the blkdev structure. I've
> also noticed that in the cdrom drivers call ioctl_by_bdev() which would
> be perfect to use, expect I cannot get a valid block_device * structure
> because some of the functions are static.
Scan the gendisk_head list. That contains all present disks and
partitions (as visible in /proc/partitions). It also contains the
partition type information if you want to restrict your volume
scan to specific partition types (this is how the software raid
code performs its scan for raid autostart devices, for example).
--Stephem
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:08 EST