Jerome Steunenberg a écrit :
Hello,
I'm trying to enumerate registered block devices, from a kernel module,
like it's done in drivers/block/genhd.c (the seq functions that output
/proc/diskstats)
genhd.c uses a static struct subsystem block_subsys but it's static so I
can't access it from a module.
How do I enumerate the kset of block devices ?
Is there a global variable somewhere for accessing the kobjects of the
block subsystem ?
Thanks,
If the information you want is in a proc file, there is a way to access
it from a kernel module.
But I don't know how :)
You can accss it by reading the proc file but it's not pretty I know.
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/