Re: devce information

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

 



On Fri, Nov 17, 2006 at 12:25:17PM +0530, Sandeep Kumar wrote:
> Hi,
> How can I know the information about a specific device, inside a kernel 
> module.
> 
> Suppose, in a string I have "/dev/hda", I want to find out its major
> number, minor and various other informations.

Why do you need to know the major/minor?

> Do we have a call back for that ?

No, not from a device name.

But if you want to walk the list of disks, you should be able to do
that, which might be what you really are looking for.  Look at the
gendisk functions.

good luck,

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