How to enumerate block devices in a kernel module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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,

Jerome Steunenberg

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux