Re: How to enumerate block devices in a kernel module

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

 



On Thu, Jul 28, 2005 at 03:59:26PM +0200, Jerome Steunenberg wrote:
> 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)

Why do you want to do this?

> genhd.c uses a static struct subsystem block_subsys but it's static so I 
> can't access it from a module.

Yes, you can't do that from a module, sorry.

> How do I enumerate the kset of block devices ?

You don't.

> Is there a global variable somewhere for accessing the kobjects of the 
> block subsystem ?

No.

thanks,

greg k-h

--
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