I am attempting to accomplish the following goal within the Linux kernel: Generate a list of all block devices so that I may be able to traverse the list and check all devices for specific drive labels.
Is there a clean routine, or proposed method of being able to (within my device driver), generate a list of all block devices? I do not want any user interaction outside of the insertion of the module. Note that I need to stay with the 2.6.26.x kernel base.
Also, I was reviewing include/linux/genhd.h and came upon a routine:
/* drivers/block/genhd.c */
extern int get_blkdev_list(char *, int);
There are a couple of problems with this:
1. genhd.c was moved from drivers/block/genhd.c to block/genhd.c, so the comment should be updated.
2. When you go into the genhd.c or even grep for a recursive search for the string get_blkdev_list, it only returns with the declaration in the header file and the entire kernel source does NOT contain its definition.
Thanks in advance.