LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-15-2004, 10:24 AM   #1
ColinLadyka
LQ Newbie
 
Registered: Mar 2004
Posts: 3

Rep: Reputation: 0
Correlation between /proc/devices and /proc/modules


Hi,

I am unsure as to the relationship between entities in /proc/devices and /proc/modules.

My /proc/devices contains, among other things:
Block devices:
3 ide0
Does this mean that driver ide0 is registered with major device number 3?
Does ide0 represent a specific driver (ie. module)? Would this change if I unloaded the current driver for my hard drive, and loaded a new different one? If it would not change in these circumstances, what good is it?

My /proc/modules contains, among other things:
ide-cd
cdrom
ext3
ips
sd_mod
scsi_mod
It does NOT contain an "ide0" entry. I understand that /proc/modules contains a list of available drivers (modules) and how many times they have been loaded. However, it does not appear to tell me what major number they are registered with. Do I really have to look in the driver source code to see what major number they will register with?

Clearly, I am confused about this. Can anyone help?

Thanks
 
Old 02-13-2006, 05:25 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,743
Blog Entries: 4

Rep: Reputation: 76
Quote:
I am unsure as to the relationship between entities in /proc/devices and /proc/modules.
I am unsure if there is any meaningful relationship.

Quote:
Does this mean that driver ide0 is registered with major device number 3?
ide0 is not a driver. It is your first ide bus, but yes, it has major device number 3. (try 'ls -l /dev/hda')

Quote:
Does ide0 represent a specific driver (ie. module)? Would this change if I unloaded the current driver for my hard drive, and loaded a new different one?
No and no.

Quote:
If it would not change in these circumstances, what good is it?
A better question is why you think it should change. Your first ide bus is always going to be your first ide bus.

Quote:
It does NOT contain an "ide0" entry.
Why would it? You don't need a different driver for each bus. You only need one driver for both of them.

Quote:
I understand that /proc/modules contains a list of available drivers (modules)
To be sure, it shows your 'loaded' modules, which is not the same thing as available modules.

Quote:
However, it does not appear to tell me what major number they are registered with.
Major numbers are for devices, not modules. Modules are not registered with a major number.

Quote:
Do I really have to look in the driver source code to see what major number they will register with?
If you do you will be looking for a long time

Quote:
Clearly, I am confused about this. Can anyone help?
Indeed. Are you trying to do something specific here? Or just learn how it works? If so, have a look at the 'Documentation' directory in the kernel source. All kinds of stuff to read...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
where is /proc/bus/usb/devices???? mrchaos Linux - Software 4 12-04-2005 10:26 PM
No PCMCIA Driver in /proc/devices??? 10xOXR Linux - Laptop and Netbook 1 09-09-2005 02:26 PM
no pcmcia drivers in /proc/devices fataldata Linux - Laptop and Netbook 6 08-19-2004 08:52 PM
/proc/bus/usb/devices missing shellcode Linux - General 11 02-24-2004 10:15 PM
nothing in /proc/pci and not finding devices naughtymutt Linux - Hardware 0 10-27-2002 10:54 PM


All times are GMT -5. The time now is 09:25 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration